开发后端
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* @Author: Kane
|
||||
* @Date: 2022-12-15 09:51:12
|
||||
* @LastEditors: Kane
|
||||
* @LastEditTime: 2022-12-15 10:04:36
|
||||
* @FilePath: \AdminSys\src\main\java\com\cpicxim\myutils\account\P13AccountCheck.java
|
||||
* @Description:
|
||||
*
|
||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||
*/
|
||||
package com.cpicxim.myutils.account;
|
||||
|
||||
public class P13AccountCheck
|
||||
{
|
||||
|
||||
}
|
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* @Author: Kane
|
||||
* @Date: 2022-12-15 11:11:21
|
||||
* @LastEditors: Kane
|
||||
* @LastEditTime: 2022-12-15 11:36:35
|
||||
* @FilePath: \AdminSys\src\main\java\com\cpicxim\web\controllers\account\P13AccountCheckController.java
|
||||
* @Description:
|
||||
*
|
||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.cpicxim.web.controllers.account;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
@Controller
|
||||
@RequestMapping( path = "/account")
|
||||
public class P13AccountCheckController
|
||||
{
|
||||
public P13AccountCheckResult checkP13Account( String P13Account, String password )
|
||||
{
|
||||
P13AccountCheckResult result = new P13AccountCheckResult();
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
* @Author: Kane
|
||||
* @Date: 2022-12-15 11:17:26
|
||||
* @LastEditors: Kane
|
||||
* @LastEditTime: 2022-12-15 11:17:38
|
||||
* @FilePath: \AdminSys\src\main\java\com\cpicxim\web\controllers\account\CheckResult.java
|
||||
* @Description:
|
||||
*
|
||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.cpicxim.web.controllers.account;
|
||||
|
||||
import com.fasterxml.jackson.annotation.*;;
|
||||
|
||||
public class P13AccountCheckResult
|
||||
{
|
||||
P13AccountCheckResult()
|
||||
{}
|
||||
|
||||
public boolean isSuccess()
|
||||
{
|
||||
return success;
|
||||
}
|
||||
|
||||
public void setSuccess( boolean success )
|
||||
{
|
||||
this.success = success;
|
||||
}
|
||||
|
||||
public String getMessage()
|
||||
{
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setMessage( String message )
|
||||
{
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int hashCode()
|
||||
{
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + (success ? 1231 : 1237);
|
||||
result = prime * result + ((message == null) ? 0 : message.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals( Object obj )
|
||||
{
|
||||
if ( this == obj)
|
||||
return true;
|
||||
if ( obj == null)
|
||||
return false;
|
||||
if ( getClass() != obj.getClass())
|
||||
return false;
|
||||
P13AccountCheckResult other = (P13AccountCheckResult) obj;
|
||||
if ( success != other.success)
|
||||
return false;
|
||||
if ( message == null)
|
||||
{
|
||||
if ( other.message != null)
|
||||
return false;
|
||||
} else if ( !message.equals( other.message ))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@JsonProperty( "success")
|
||||
private boolean success;
|
||||
|
||||
@JsonProperty( "message")
|
||||
private String message;
|
||||
}
|
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* @Author: Kane
|
||||
* @Date: 2022-12-15 10:44:20
|
||||
* @LastEditors: Kane
|
||||
* @LastEditTime: 2022-12-15 10:49:25
|
||||
* @FilePath: \AdminSys\src\main\java\com\cpicxim\web\filters\CrosFilter.java
|
||||
* @Description:
|
||||
*
|
||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||
*/
|
||||
package com.cpicxim.web.filters;
|
||||
|
||||
import java.io.IOException;
|
||||
import javax.servlet.Filter;
|
||||
import javax.servlet.FilterChain;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletResponse;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
public class CrosFilter implements Filter
|
||||
{
|
||||
@Override
|
||||
public void doFilter( ServletRequest req, ServletResponse resp, FilterChain chain )
|
||||
throws ServletException, IOException
|
||||
{
|
||||
HttpServletRequest request = (HttpServletRequest) req;
|
||||
HttpServletResponse response = (HttpServletResponse) resp;
|
||||
String originHeader = request.getHeader( "Origin" );
|
||||
|
||||
response.setHeader( "Access-Control-Allow-Origin", originHeader );
|
||||
response.setHeader( "Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE" );
|
||||
response.setHeader( "Access-Control-Max-Age", "0" );
|
||||
response.setHeader( "Access-Control-Allow-Headers",
|
||||
"Origin, No-Cache, X-Requested-With, If-Modified-Since, Pragma, Last-Modified, Cache-Control, Expires, Content-Type, X-E4M-With,userId,token" );
|
||||
response.setHeader( "Access-Control-Allow-Credentials", "true" );
|
||||
response.setHeader( "XDomainRequestAllowed", "1" );
|
||||
response.setHeader( "XDomainRequestAllowed", "1" );
|
||||
|
||||
chain.doFilter( request, response );
|
||||
}
|
||||
}
|
27
企业级管理系统/java/AdminSys/src/main/webapp/WEB-INF/web.xml
Normal file
27
企业级管理系统/java/AdminSys/src/main/webapp/WEB-INF/web.xml
Normal file
@@ -0,0 +1,27 @@
|
||||
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" version="3.1">
|
||||
<display-name>Archetype Created Web Application</display-name>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>springmvc</servlet-name>
|
||||
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
|
||||
<init-param>
|
||||
<param-name>contextConfigLocation</param-name>
|
||||
<param-value>classpath:spring.xml</param-value>
|
||||
</init-param>
|
||||
<load-on-startup>1</load-on-startup>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>springmvc</servlet-name>
|
||||
<url-pattern>*.do</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<filter>
|
||||
<filter-name>cros-filter</filter-name>
|
||||
<filter-class>com.cpicxim.web.filters.cros.CrosFilter</filter-class>
|
||||
</filter>
|
||||
<filter-mapping>
|
||||
<filter-name>cros-filter</filter-name>
|
||||
<url-pattern>*.do</url-pattern>
|
||||
</filter-mapping>
|
||||
|
||||
</web-app>
|
5
企业级管理系统/java/AdminSys/src/main/webapp/index.jsp
Normal file
5
企业级管理系统/java/AdminSys/src/main/webapp/index.jsp
Normal file
@@ -0,0 +1,5 @@
|
||||
<html>
|
||||
<body>
|
||||
<h2>Hello World!</h2>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user