开发后端
This commit is contained in:
parent
5dcff64bf5
commit
5f174b312c
3
企业级管理系统/java/AdminSys/.vscode/settings.json
vendored
Normal file
3
企业级管理系统/java/AdminSys/.vscode/settings.json
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"java.configuration.updateBuildConfiguration": "automatic"
|
||||||
|
}
|
103
企业级管理系统/java/AdminSys/pom.xml
Normal file
103
企业级管理系统/java/AdminSys/pom.xml
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>com.cpicxim</groupId>
|
||||||
|
<artifactId>AdminSys</artifactId>
|
||||||
|
<packaging>war</packaging>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<name>AdminSys Maven Webapp</name>
|
||||||
|
<url>http://maven.apache.org</url>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>junit</groupId>
|
||||||
|
<artifactId>junit</artifactId>
|
||||||
|
<version>3.8.1</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<!-- https://mvnrepository.com/artifact/org.springframework/spring-webmvc -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-webmvc</artifactId>
|
||||||
|
<version>5.3.23</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.oracle</groupId>
|
||||||
|
<artifactId>ojdbc8</artifactId>
|
||||||
|
<version>19.3.0.0.0</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.servlet</groupId>
|
||||||
|
<artifactId>javax.servlet-api</artifactId>
|
||||||
|
<version>4.0.1</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.validation</groupId>
|
||||||
|
<artifactId>validation-api</artifactId>
|
||||||
|
<version>2.0.1.Final</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-validator</artifactId>
|
||||||
|
<version>7.0.1.Final</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- jackson -->
|
||||||
|
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.fasterxml.jackson.core</groupId>
|
||||||
|
<artifactId>jackson-databind</artifactId>
|
||||||
|
<version>2.13.4</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.fasterxml.jackson.core</groupId>
|
||||||
|
<artifactId>jackson-core</artifactId>
|
||||||
|
<version>2.13.4</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-annotations -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.fasterxml.jackson.core</groupId>
|
||||||
|
<artifactId>jackson-annotations</artifactId>
|
||||||
|
<version>2.13.4</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- https://mvnrepository.com/artifact/commons-io/commons-io -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-io</groupId>
|
||||||
|
<artifactId>commons-io</artifactId>
|
||||||
|
<version>2.11.0</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- https://mvnrepository.com/artifact/commons-fileupload/commons-fileupload -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-fileupload</groupId>
|
||||||
|
<artifactId>commons-fileupload</artifactId>
|
||||||
|
<version>1.4</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- https://mvnrepository.com/artifact/javax.annotation/javax.annotation-api -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.annotation</groupId>
|
||||||
|
<artifactId>javax.annotation-api</artifactId>
|
||||||
|
<version>1.3.2</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<finalName>AdminSys</finalName>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-war-plugin</artifactId>
|
||||||
|
<version>3.2.2</version>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<java.version>1.8</java.version>
|
||||||
|
<maven.compiler.encoding>UTF-8</maven.compiler.encoding>
|
||||||
|
<maven.compiler.source>1.8</maven.compiler.source>
|
||||||
|
<maven.compiler.target>1.8</maven.compiler.target>
|
||||||
|
</properties>
|
||||||
|
</project>
|
@ -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>
|
27
企业级管理系统/java/AdminSys/target/AdminSys/WEB-INF/web.xml
Normal file
27
企业级管理系统/java/AdminSys/target/AdminSys/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/target/AdminSys/index.jsp
Normal file
5
企业级管理系统/java/AdminSys/target/AdminSys/index.jsp
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<html>
|
||||||
|
<body>
|
||||||
|
<h2>Hello World!</h2>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -0,0 +1,4 @@
|
|||||||
|
#Created by Apache Maven 3.8.6
|
||||||
|
artifactId=AdminSys
|
||||||
|
groupId=com.cpicxim
|
||||||
|
version=1.0-SNAPSHOT
|
@ -0,0 +1,2 @@
|
|||||||
|
com\cpicxim\myutils\account\P13AccountCheck.class
|
||||||
|
com\cpicxim\web\filters\CrosFilter.class
|
@ -0,0 +1,2 @@
|
|||||||
|
F:\练手代码\vue-learning\企业级管理系统\java\AdminSys\src\main\java\com\cpicxim\myutils\account\P13AccountCheck.java
|
||||||
|
F:\练手代码\vue-learning\企业级管理系统\java\AdminSys\src\main\java\com\cpicxim\web\filters\CrosFilter.java
|
Loading…
x
Reference in New Issue
Block a user