保存进度!
This commit is contained in:
		
							
								
								
									
										4
									
								
								code/java/后端-用户验证/.vscode/settings.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								code/java/后端-用户验证/.vscode/settings.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,4 @@
 | 
			
		||||
{
 | 
			
		||||
    "java.configuration.updateBuildConfiguration": "automatic",
 | 
			
		||||
    "java.compile.nullAnalysis.mode": "automatic"
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										112
									
								
								code/java/后端-用户验证/pom.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										112
									
								
								code/java/后端-用户验证/pom.xml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,112 @@
 | 
			
		||||
<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.cpic.xim</groupId>
 | 
			
		||||
  <artifactId>admin-system</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>4.13.2</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.24</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>admin-system</finalName>
 | 
			
		||||
    <plugins>
 | 
			
		||||
      <plugin>
 | 
			
		||||
        <groupId>org.apache.maven.plugins</groupId>
 | 
			
		||||
        <artifactId>maven-war-plugin</artifactId>
 | 
			
		||||
        <version>3.2.2</version>
 | 
			
		||||
      </plugin>
 | 
			
		||||
      <plugin>
 | 
			
		||||
        <groupId>org.apache.maven.plugins</groupId>
 | 
			
		||||
        <artifactId>maven-surefire-plugin</artifactId>
 | 
			
		||||
        <version>3.0.0-M6</version>
 | 
			
		||||
        <configuration>
 | 
			
		||||
          <skipTests>true</skipTests>
 | 
			
		||||
        </configuration>
 | 
			
		||||
      </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,210 @@
 | 
			
		||||
/*
 | 
			
		||||
 * @Author: Kane
 | 
			
		||||
 * @Date: 2022-12-15 14:08:28
 | 
			
		||||
 * @LastEditors: Kane
 | 
			
		||||
 * @LastEditTime: 2022-12-16 17:57:06
 | 
			
		||||
 * @FilePath: \AdminSys\src\main\java\com\cpic\xim\myutils\account\CpicXIMStaffInfo.java
 | 
			
		||||
 * @Description: 产险厦门分公司员工信息对象
 | 
			
		||||
 * 
 | 
			
		||||
 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
			
		||||
 */
 | 
			
		||||
package com.cpic.xim.myutils.account;
 | 
			
		||||
 | 
			
		||||
import java.sql.Connection;
 | 
			
		||||
import java.sql.DriverManager;
 | 
			
		||||
import java.sql.PreparedStatement;
 | 
			
		||||
import java.sql.ResultSet;
 | 
			
		||||
import java.sql.SQLException;
 | 
			
		||||
import com.fasterxml.jackson.annotation.JsonProperty;
 | 
			
		||||
 | 
			
		||||
/*****************************************************
 | 
			
		||||
 * 厦门太保员工信息
 | 
			
		||||
 * 使用工厂函数创建。
 | 
			
		||||
 *****************************************************/
 | 
			
		||||
public class CpicXIMStaffInfo
 | 
			
		||||
{
 | 
			
		||||
    /*****************************************************
 | 
			
		||||
     * 查询员工信息
 | 
			
		||||
     * @param uidOrCode p13账号或p09账号
 | 
			
		||||
     * @return 员工信息对象
 | 
			
		||||
     *****************************************************/
 | 
			
		||||
    public static CpicXIMStaffInfo getStaffInfo( String uidOrCode )
 | 
			
		||||
            throws SQLException, ClassNotFoundException
 | 
			
		||||
    {
 | 
			
		||||
        CpicXIMStaffInfo info = null;
 | 
			
		||||
 | 
			
		||||
        Connection connection = null;
 | 
			
		||||
        PreparedStatement stmt = null;
 | 
			
		||||
        ResultSet result = null;
 | 
			
		||||
 | 
			
		||||
        String jdbcURL = "jdbc:oracle:thin:@10.39.0.86:1521:xmcx1";
 | 
			
		||||
        String userName = "dataex";
 | 
			
		||||
        String password = "cpic123456";
 | 
			
		||||
        String querySQL = "SELECT ry.staff_code,ry.staff_name,ry.p13uid,"
 | 
			
		||||
                + "               ry.department_code, bm.department_name,"
 | 
			
		||||
                + "               ry.section_office_code,ks.section_office_name "
 | 
			
		||||
                + "          FROM idst0.rydm_t ry,idst0.ks_t ks,idst0.bm_t bm "
 | 
			
		||||
                + "         WHERE ry.account_status = 0 AND (ry.staff_code = ? OR ry.p13uid = ?) "
 | 
			
		||||
                + "           and ry.section_office_code = ks.section_office_code "
 | 
			
		||||
                + "           and ry.department_code = bm.department_code ";
 | 
			
		||||
 | 
			
		||||
        try
 | 
			
		||||
        {
 | 
			
		||||
            Class.forName( "oracle.jdbc.driver.OracleDriver" );
 | 
			
		||||
 | 
			
		||||
            connection = DriverManager.getConnection( jdbcURL, userName, password );
 | 
			
		||||
            stmt = connection.prepareStatement( querySQL );
 | 
			
		||||
            stmt.setString( 1, uidOrCode );
 | 
			
		||||
            stmt.setString( 2, uidOrCode );
 | 
			
		||||
 | 
			
		||||
            result = stmt.executeQuery();
 | 
			
		||||
 | 
			
		||||
            if ( result.next())
 | 
			
		||||
            {
 | 
			
		||||
                info = new CpicXIMStaffInfo();
 | 
			
		||||
 | 
			
		||||
                info.code = result.getString( 1 );
 | 
			
		||||
                info.name = result.getString( 2 );
 | 
			
		||||
                info.p13UID = result.getString( 3 );
 | 
			
		||||
                info.departmentCode = result.getString( 4 );
 | 
			
		||||
                info.departmentName = result.getString( 5 );
 | 
			
		||||
                info.sectionOfficeCode = result.getString( 6 );
 | 
			
		||||
                info.setctionOfficeName = result.getString( 7 );
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        finally
 | 
			
		||||
        {
 | 
			
		||||
            try
 | 
			
		||||
            {
 | 
			
		||||
                if ( result != null)
 | 
			
		||||
                {
 | 
			
		||||
                    result.close();
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            catch ( Exception exception )
 | 
			
		||||
            {
 | 
			
		||||
                exception.printStackTrace();
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            try
 | 
			
		||||
            {
 | 
			
		||||
                if ( stmt != null)
 | 
			
		||||
                {
 | 
			
		||||
                    stmt.close();
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            catch ( Exception exception )
 | 
			
		||||
            {
 | 
			
		||||
                exception.printStackTrace();
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            try
 | 
			
		||||
            {
 | 
			
		||||
                if ( connection != null)
 | 
			
		||||
                {
 | 
			
		||||
                    connection.close();
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            catch ( Exception exception )
 | 
			
		||||
            {
 | 
			
		||||
                exception.printStackTrace();
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        return info;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private CpicXIMStaffInfo()
 | 
			
		||||
    {}
 | 
			
		||||
 | 
			
		||||
    public String getName()
 | 
			
		||||
    {
 | 
			
		||||
        return name;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setName( String name )
 | 
			
		||||
    {
 | 
			
		||||
        this.name = name;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getCode()
 | 
			
		||||
    {
 | 
			
		||||
        return code;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setCode( String code )
 | 
			
		||||
    {
 | 
			
		||||
        this.code = code;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getP13UID()
 | 
			
		||||
    {
 | 
			
		||||
        return p13UID;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setP13UID( String p13uid )
 | 
			
		||||
    {
 | 
			
		||||
        p13UID = p13uid;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getDepartmentCode()
 | 
			
		||||
    {
 | 
			
		||||
        return departmentCode;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setDepartmentCode( String departmentCode )
 | 
			
		||||
    {
 | 
			
		||||
        this.departmentCode = departmentCode;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getDepartmentName()
 | 
			
		||||
    {
 | 
			
		||||
        return departmentName;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setDepartmentName( String departmentName )
 | 
			
		||||
    {
 | 
			
		||||
        this.departmentName = departmentName;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getSectionOfficeCode()
 | 
			
		||||
    {
 | 
			
		||||
        return sectionOfficeCode;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setSectionOfficeCode( String sectionOfficeCode )
 | 
			
		||||
    {
 | 
			
		||||
        this.sectionOfficeCode = sectionOfficeCode;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getSetctionOfficeName()
 | 
			
		||||
    {
 | 
			
		||||
        return setctionOfficeName;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setSetctionOfficeName( String setctionOfficeName )
 | 
			
		||||
    {
 | 
			
		||||
        this.setctionOfficeName = setctionOfficeName;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @JsonProperty( "name")
 | 
			
		||||
    private String name;
 | 
			
		||||
 | 
			
		||||
    @JsonProperty( "code")
 | 
			
		||||
    private String code;
 | 
			
		||||
 | 
			
		||||
    @JsonProperty( "p13uid")
 | 
			
		||||
    private String p13UID;
 | 
			
		||||
 | 
			
		||||
    @JsonProperty( "department_code")
 | 
			
		||||
    private String departmentCode;
 | 
			
		||||
 | 
			
		||||
    @JsonProperty( "department_name")
 | 
			
		||||
    private String departmentName;
 | 
			
		||||
 | 
			
		||||
    @JsonProperty( "section_office_code")
 | 
			
		||||
    private String sectionOfficeCode;
 | 
			
		||||
 | 
			
		||||
    @JsonProperty( "section_office_name")
 | 
			
		||||
    private String setctionOfficeName;
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,70 @@
 | 
			
		||||
/*
 | 
			
		||||
 * @Author: Kane
 | 
			
		||||
 * @Date: 2022-12-15 09:51:12
 | 
			
		||||
 * @LastEditors: Kane
 | 
			
		||||
 * @LastEditTime: 2022-12-16 15:29:34
 | 
			
		||||
 * @FilePath: \AdminSys\src\main\java\com\cpic\xim\myutils\account\LdapAccountCheck.java
 | 
			
		||||
 * @Description: P13验证相关方法。
 | 
			
		||||
 * 
 | 
			
		||||
 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
			
		||||
 */
 | 
			
		||||
package com.cpic.xim.myutils.account;
 | 
			
		||||
 | 
			
		||||
import javax.naming.CommunicationException;
 | 
			
		||||
import javax.naming.Context;
 | 
			
		||||
import javax.naming.NamingException;
 | 
			
		||||
import javax.naming.directory.DirContext;
 | 
			
		||||
import javax.naming.directory.InitialDirContext;
 | 
			
		||||
import java.util.Hashtable;
 | 
			
		||||
 | 
			
		||||
public class LdapAccountCheck
 | 
			
		||||
{
 | 
			
		||||
    private static String ldapServerUrl = "ldap://10.39.0.205:389";
 | 
			
		||||
 | 
			
		||||
    /*****************************************************
 | 
			
		||||
     * 对p13账号密码提交AD域服务器进行验证
 | 
			
		||||
     * @param userName p13uid
 | 
			
		||||
     * @param password p13密码
 | 
			
		||||
     * @return 返回验证结果,true为成功,false失败。
 | 
			
		||||
     *****************************************************/
 | 
			
		||||
    public static boolean ldapLogin( String userName, String password )
 | 
			
		||||
    {
 | 
			
		||||
        boolean result = false;
 | 
			
		||||
 | 
			
		||||
        if ( userName.endsWith( "@pr.intra.cpic.com.cn" ) == false)
 | 
			
		||||
        {
 | 
			
		||||
            userName += "@pr.intra.cpic.com.cn";
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        DirContext ctx = null;
 | 
			
		||||
        Hashtable<String, String> ldap = new Hashtable<String, String>();
 | 
			
		||||
 | 
			
		||||
        ldap.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
 | 
			
		||||
        ldap.put( Context.SECURITY_AUTHENTICATION, "simple" );
 | 
			
		||||
        ldap.put( Context.PROVIDER_URL, ldapServerUrl );
 | 
			
		||||
        ldap.put( Context.SECURITY_PRINCIPAL, userName );
 | 
			
		||||
        ldap.put( Context.SECURITY_CREDENTIALS, password );
 | 
			
		||||
 | 
			
		||||
        try
 | 
			
		||||
        {
 | 
			
		||||
            ctx = new InitialDirContext( ldap );
 | 
			
		||||
            ctx.close();
 | 
			
		||||
 | 
			
		||||
            result = true;
 | 
			
		||||
        }
 | 
			
		||||
        catch ( CommunicationException error )
 | 
			
		||||
        {
 | 
			
		||||
            error.printStackTrace();
 | 
			
		||||
            error.getMessage();
 | 
			
		||||
 | 
			
		||||
            result = false;
 | 
			
		||||
        }
 | 
			
		||||
        catch ( NamingException error )
 | 
			
		||||
        {
 | 
			
		||||
            error.printStackTrace();
 | 
			
		||||
            result = false;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        return result;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,20 @@
 | 
			
		||||
/*
 | 
			
		||||
 * @Author: Kane
 | 
			
		||||
 * @Date: 2022-12-16 08:50:47
 | 
			
		||||
 * @LastEditors: Kane
 | 
			
		||||
 * @LastEditTime: 2022-12-16 10:15:11
 | 
			
		||||
 * @FilePath: \AdminSys\src\main\java\com\cpic\xim\myutils\config\json\AppConfig.java
 | 
			
		||||
 * @Description: 应用的JSON格式配置文件对象
 | 
			
		||||
 * 
 | 
			
		||||
 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
			
		||||
 */
 | 
			
		||||
package com.cpic.xim.myutils.config.json;
 | 
			
		||||
 | 
			
		||||
import com.fasterxml.jackson.annotation.JsonProperty;
 | 
			
		||||
 | 
			
		||||
@SuppressWarnings(
 | 
			
		||||
{ "unused"})
 | 
			
		||||
public class AppConfig
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,16 @@
 | 
			
		||||
/*
 | 
			
		||||
 * @Author: Kane
 | 
			
		||||
 * @Date: 2022-12-15 16:19:39
 | 
			
		||||
 * @LastEditors: Kane
 | 
			
		||||
 * @LastEditTime: 2022-12-15 16:19:41
 | 
			
		||||
 * @FilePath: \AdminSys\src\main\java\com\cpicxim\myutils\config\json\ConfigLoader.java
 | 
			
		||||
 * @Description: 
 | 
			
		||||
 * 
 | 
			
		||||
 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
			
		||||
 */
 | 
			
		||||
package com.cpic.xim.myutils.config.json;
 | 
			
		||||
 | 
			
		||||
public class ConfigLoader
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,24 @@
 | 
			
		||||
/*
 | 
			
		||||
 * @Author: Kane
 | 
			
		||||
 * @Date: 2022-12-16 08:55:32
 | 
			
		||||
 * @LastEditors: Kane
 | 
			
		||||
 * @LastEditTime: 2022-12-16 10:15:42
 | 
			
		||||
 * @FilePath: \AdminSys\src\main\java\com\cpic\xim\myutils\config\json\DatabaseConfig.java
 | 
			
		||||
 * @Description: 
 | 
			
		||||
 * 
 | 
			
		||||
 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
			
		||||
 */
 | 
			
		||||
package com.cpic.xim.myutils.config.json;
 | 
			
		||||
 | 
			
		||||
import com.fasterxml.jackson.annotation.JsonProperty;
 | 
			
		||||
 | 
			
		||||
@SuppressWarnings(
 | 
			
		||||
{ "unused"})
 | 
			
		||||
public class DatabaseConfig
 | 
			
		||||
{
 | 
			
		||||
    private String dbType;
 | 
			
		||||
    private String userName;
 | 
			
		||||
    private String password;
 | 
			
		||||
    private String dbName;
 | 
			
		||||
    private String jdbcURL;
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,80 @@
 | 
			
		||||
/*
 | 
			
		||||
 * @Author: Kane
 | 
			
		||||
 * @Date: 2023-01-22 23:11:26
 | 
			
		||||
 * @LastEditors: Kane
 | 
			
		||||
 * @LastEditTime: 2023-01-24 00:55:08
 | 
			
		||||
 * @FilePath: \AdminSys\src\main\java\com\cpic\xim\web\controllers\FileUpload\FileUpload.java
 | 
			
		||||
 * @Description: 用于接受上传文件的Controller。
 | 
			
		||||
 * 
 | 
			
		||||
 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
package com.cpic.xim.web.controllers.FileUpload;
 | 
			
		||||
 | 
			
		||||
import java.io.File;
 | 
			
		||||
import java.util.Vector;
 | 
			
		||||
import javax.servlet.http.HttpServletRequest;
 | 
			
		||||
import org.springframework.stereotype.Controller;
 | 
			
		||||
import org.springframework.web.bind.annotation.RequestMapping;
 | 
			
		||||
import org.springframework.web.bind.annotation.RequestParam;
 | 
			
		||||
import org.springframework.web.bind.annotation.ResponseBody;
 | 
			
		||||
import org.springframework.web.multipart.MultipartFile;
 | 
			
		||||
 | 
			
		||||
@SuppressWarnings( "unused" )
 | 
			
		||||
@Controller
 | 
			
		||||
@RequestMapping( path = "/file" )
 | 
			
		||||
public class FileUpload
 | 
			
		||||
{
 | 
			
		||||
    /*****************************************************
 | 
			
		||||
     * 接收上传文件,并保存到临时目录:
 | 
			
		||||
     * 1、临时目录下再用sessionID作为子目录保存文件。
 | 
			
		||||
     * 2、保存时不更改文件名,会覆盖同名文件。
 | 
			
		||||
     * 3、MultipartFile参数形参名称必须和请求form中file标签的name属性一致,否则值为null。
 | 
			
		||||
     * 4、返回值为接收结果和文件保存路径。
 | 
			
		||||
     *****************************************************/
 | 
			
		||||
    @RequestMapping( path = "/file-upload.do" )
 | 
			
		||||
    @ResponseBody
 | 
			
		||||
    public FileUploadResult getUploadFile( @RequestParam( "task-name" ) String taskName,
 | 
			
		||||
            @RequestParam( "file" ) MultipartFile[] files, HttpServletRequest request )
 | 
			
		||||
    {
 | 
			
		||||
        // session id用来创建临时目录,避免重复
 | 
			
		||||
        String sessionID = request.getSession().getId();
 | 
			
		||||
        FileUploadResult result = new FileUploadResult();
 | 
			
		||||
        Vector<String> fileNames = new Vector<String>();
 | 
			
		||||
        int fileCount = files.length;
 | 
			
		||||
 | 
			
		||||
        // 防御验证
 | 
			
		||||
        if ( files.length == 0 )
 | 
			
		||||
        {
 | 
			
		||||
            result.setSuccess( false );
 | 
			
		||||
            result.setMessage( "此接口用于上传文件!" );
 | 
			
		||||
 | 
			
		||||
            return result;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        result.setSuccess( true );
 | 
			
		||||
        result.setMessage( "上传成功!" );
 | 
			
		||||
 | 
			
		||||
        for ( MultipartFile file : files )
 | 
			
		||||
        {
 | 
			
		||||
            // 检查文件长度,如果为0则跳过
 | 
			
		||||
            if ( file.isEmpty() )
 | 
			
		||||
            {
 | 
			
		||||
 | 
			
		||||
                continue;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            // 保存文件到临时目录
 | 
			
		||||
            String filePath =
 | 
			
		||||
                    request.getServletContext().getRealPath( "/temp/upload/" + sessionID );
 | 
			
		||||
            String fileName = file.getOriginalFilename();
 | 
			
		||||
            File destFile = new File( filePath, fileName );
 | 
			
		||||
 | 
			
		||||
            fileNames.add( file.getOriginalFilename() );
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        result.setFileList( fileNames );
 | 
			
		||||
 | 
			
		||||
        return result;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,62 @@
 | 
			
		||||
/*
 | 
			
		||||
 * @Author: Kane
 | 
			
		||||
 * @Date: 2023-01-23 22:56:17
 | 
			
		||||
 * @LastEditors: Kane
 | 
			
		||||
 * @LastEditTime: 2023-01-23 22:56:25
 | 
			
		||||
 * @FilePath: \AdminSys\src\main\java\com\cpic\xim\web\controllers\FileUpload\FileUploadResult.java
 | 
			
		||||
 * @Description: 
 | 
			
		||||
 * 
 | 
			
		||||
 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
package com.cpic.xim.web.controllers.FileUpload;
 | 
			
		||||
 | 
			
		||||
import java.util.Vector;
 | 
			
		||||
import com.fasterxml.jackson.annotation.JsonProperty;
 | 
			
		||||
 | 
			
		||||
@SuppressWarnings( "unused" )
 | 
			
		||||
public class FileUploadResult
 | 
			
		||||
{
 | 
			
		||||
    public FileUploadResult()
 | 
			
		||||
    {}
 | 
			
		||||
 | 
			
		||||
    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;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public Vector<String> getFileList()
 | 
			
		||||
    {
 | 
			
		||||
        return fileList;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setFileList( Vector<String> fileList )
 | 
			
		||||
    {
 | 
			
		||||
        this.fileList = fileList;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @JsonProperty( "success" )
 | 
			
		||||
    private boolean success;
 | 
			
		||||
 | 
			
		||||
    @JsonProperty( "message" )
 | 
			
		||||
    private String message;
 | 
			
		||||
 | 
			
		||||
    @JsonProperty( "file-list" )
 | 
			
		||||
    private Vector<String> fileList;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -0,0 +1,114 @@
 | 
			
		||||
/*
 | 
			
		||||
 * @Author: Kane
 | 
			
		||||
 * @Date: 2022-12-15 11:11:21
 | 
			
		||||
 * @LastEditors: Kane
 | 
			
		||||
 * @LastEditTime: 2023-01-17 23:28:21
 | 
			
		||||
 * @FilePath: \AdminSys\src\main\java\com\cpic\xim\web\controllers\account\P13AccountCheckController.java
 | 
			
		||||
 * @Description: P13账号验证用Controller。
 | 
			
		||||
 * 
 | 
			
		||||
 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
			
		||||
 */
 | 
			
		||||
package com.cpic.xim.web.controllers.account;
 | 
			
		||||
 | 
			
		||||
import java.io.IOException;
 | 
			
		||||
import java.nio.channels.IllegalSelectorException;
 | 
			
		||||
import java.sql.SQLException;
 | 
			
		||||
import javax.servlet.ServletContext;
 | 
			
		||||
import javax.servlet.http.HttpServletRequest;
 | 
			
		||||
import javax.servlet.http.HttpServletResponse;
 | 
			
		||||
import javax.servlet.http.HttpSession;
 | 
			
		||||
import org.springframework.stereotype.Controller;
 | 
			
		||||
import org.springframework.web.bind.annotation.RequestBody;
 | 
			
		||||
import org.springframework.web.bind.annotation.RequestMapping;
 | 
			
		||||
import org.springframework.web.bind.annotation.ResponseBody;
 | 
			
		||||
import com.cpic.xim.myutils.account.CpicXIMStaffInfo;
 | 
			
		||||
import com.cpic.xim.myutils.account.LdapAccountCheck;
 | 
			
		||||
 | 
			
		||||
@Controller
 | 
			
		||||
@RequestMapping( path = "/account" )
 | 
			
		||||
@SuppressWarnings( "unused" )
 | 
			
		||||
public class P13AccountCheckController
 | 
			
		||||
{
 | 
			
		||||
    /*****************************************************
 | 
			
		||||
     * 根据用户提供的P09工号或者P13账号密码,查找用户信息,并AD域服务器验证p13账号密码。
 | 
			
		||||
     * 验证通过即返回人员信息。
 | 
			
		||||
     * 验证不通过result.success值为false,并在message提供失败原因。
 | 
			
		||||
     * @param param 由json格式转换的请求参数
 | 
			
		||||
     * @param request
 | 
			
		||||
     * @param response
 | 
			
		||||
     * @return 返回一个P13AccountCheckResult对象,其中提供验证结果
 | 
			
		||||
     *****************************************************/
 | 
			
		||||
    @ResponseBody
 | 
			
		||||
    @RequestMapping( path = "/p13_account_check" )
 | 
			
		||||
    public P13AccountCheckResult checkP13Account( @RequestBody P13AccountCheckRequest param,
 | 
			
		||||
            HttpServletRequest request, HttpServletResponse response )
 | 
			
		||||
            throws IllegalSelectorException, IOException
 | 
			
		||||
    {
 | 
			
		||||
        P13AccountCheckResult result = new P13AccountCheckResult();
 | 
			
		||||
        ServletContext context = request.getServletContext();
 | 
			
		||||
 | 
			
		||||
        // context.getAttribute( null );
 | 
			
		||||
        CpicXIMStaffInfo staff = null;
 | 
			
		||||
 | 
			
		||||
        try
 | 
			
		||||
        {
 | 
			
		||||
            // 先根据用户输入的09工号或p13账号获得p13账号,确定账号存在
 | 
			
		||||
            staff = CpicXIMStaffInfo.getStaffInfo( param.getP13Account() );
 | 
			
		||||
        }
 | 
			
		||||
        catch ( SQLException error )
 | 
			
		||||
        {
 | 
			
		||||
            staff = null;
 | 
			
		||||
            result.setMessage( "人员工号或P13账号不存在!" );
 | 
			
		||||
            result.setSuccess( false );
 | 
			
		||||
        }
 | 
			
		||||
        catch ( ClassNotFoundException error )
 | 
			
		||||
        {
 | 
			
		||||
            staff = null;
 | 
			
		||||
            result.setMessage( "加载Oracle驱动失败!" );
 | 
			
		||||
            result.setSuccess( false );
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // 查询结果是null,说明没有查询到结果,工号或p13账号不存在,返回结果。
 | 
			
		||||
        if ( staff == null )
 | 
			
		||||
        {
 | 
			
		||||
            result.setMessage( "人员工号或P13账号不存在!" );
 | 
			
		||||
            result.setSuccess( false );
 | 
			
		||||
 | 
			
		||||
            return result;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // 判断一下p13是否存在,如果不存在就结束过程
 | 
			
		||||
        if ( staff.getP13UID().isEmpty() == true )
 | 
			
		||||
        {
 | 
			
		||||
            result.setMessage( "P13账号不存在,请联系信息技术部申请账号!" );
 | 
			
		||||
            result.setSuccess( false );
 | 
			
		||||
 | 
			
		||||
            return result;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // 进行ldap验证
 | 
			
		||||
        boolean ldapCheckResult =
 | 
			
		||||
                LdapAccountCheck.ldapLogin( staff.getP13UID(), param.getPassword() );
 | 
			
		||||
 | 
			
		||||
        if ( ldapCheckResult == true )
 | 
			
		||||
        {
 | 
			
		||||
            result.setSuccess( true );
 | 
			
		||||
            result.setMessage( "验证成功!" );
 | 
			
		||||
            result.setStaffInfo( staff );
 | 
			
		||||
 | 
			
		||||
            // 将获取到的人员信息保存到会话中
 | 
			
		||||
            HttpSession session = request.getSession();
 | 
			
		||||
 | 
			
		||||
            session.setAttribute( "staff_info", staff );
 | 
			
		||||
        }
 | 
			
		||||
        else
 | 
			
		||||
        {
 | 
			
		||||
            result.setSuccess( false );
 | 
			
		||||
            result.setMessage( "密码错误!" );
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        result.setToken( param.getP13Account() );
 | 
			
		||||
 | 
			
		||||
        return result;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,45 @@
 | 
			
		||||
/*
 | 
			
		||||
 * @Author: Kane
 | 
			
		||||
 * @Date: 2022-12-15 21:01:43
 | 
			
		||||
 * @LastEditors: Kane
 | 
			
		||||
 * @LastEditTime: 2022-12-15 21:03:21
 | 
			
		||||
 * @FilePath: \AdminSys\src\main\java\com\cpic\xim\web\controllers\account\P13AccountCheckRequest.java
 | 
			
		||||
 * @Description: 
 | 
			
		||||
 * 
 | 
			
		||||
 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
			
		||||
 */
 | 
			
		||||
package com.cpic.xim.web.controllers.account;
 | 
			
		||||
 | 
			
		||||
import com.fasterxml.jackson.annotation.*;
 | 
			
		||||
 | 
			
		||||
public class P13AccountCheckRequest
 | 
			
		||||
{
 | 
			
		||||
    P13AccountCheckRequest()
 | 
			
		||||
    {}
 | 
			
		||||
 | 
			
		||||
    public String getP13Account()
 | 
			
		||||
    {
 | 
			
		||||
        return p13Account;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setP13Account( String p13Account )
 | 
			
		||||
    {
 | 
			
		||||
        this.p13Account = p13Account;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getPassword()
 | 
			
		||||
    {
 | 
			
		||||
        return password;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setPassword( String password )
 | 
			
		||||
    {
 | 
			
		||||
        this.password = password;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @JsonProperty( "p13account")
 | 
			
		||||
    private String p13Account;
 | 
			
		||||
 | 
			
		||||
    @JsonProperty( "password")
 | 
			
		||||
    private String password;
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,110 @@
 | 
			
		||||
/*
 | 
			
		||||
 * @Author: Kane
 | 
			
		||||
 * @Date: 2022-12-15 11:17:26
 | 
			
		||||
 * @LastEditors: Kane
 | 
			
		||||
 * @LastEditTime: 2023-01-10 14:58:53
 | 
			
		||||
 * @FilePath: \AdminSys\src\main\java\com\cpic\xim\web\controllers\account\P13AccountCheckResult.java
 | 
			
		||||
 * @Description: 
 | 
			
		||||
 * 
 | 
			
		||||
 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
package com.cpic.xim.web.controllers.account;
 | 
			
		||||
 | 
			
		||||
import com.cpic.xim.myutils.account.CpicXIMStaffInfo;
 | 
			
		||||
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;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public CpicXIMStaffInfo getStaffInfo()
 | 
			
		||||
    {
 | 
			
		||||
        return staffInfo;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setStaffInfo( CpicXIMStaffInfo staffInfo )
 | 
			
		||||
    {
 | 
			
		||||
        this.staffInfo = staffInfo;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    public String getToken()
 | 
			
		||||
    {
 | 
			
		||||
        return token;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setToken( String token )
 | 
			
		||||
    {
 | 
			
		||||
        this.token = token;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @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;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    // 验证结果状态,true为成功,false为失败
 | 
			
		||||
    @JsonProperty( "success")
 | 
			
		||||
    private boolean success;
 | 
			
		||||
 | 
			
		||||
    // 验证结果消息字符串,用来提示前端。
 | 
			
		||||
    @JsonProperty( "message")
 | 
			
		||||
    private String message;
 | 
			
		||||
 | 
			
		||||
    // 用户的token
 | 
			
		||||
    @JsonProperty( "token")
 | 
			
		||||
    private String token;
 | 
			
		||||
 | 
			
		||||
    // 验证成功后查询到的人员信息。
 | 
			
		||||
    @JsonProperty( "staff_info")
 | 
			
		||||
    CpicXIMStaffInfo staffInfo;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,43 @@
 | 
			
		||||
/*
 | 
			
		||||
 * @Author: Kane
 | 
			
		||||
 * @Date: 2022-12-15 10:44:20
 | 
			
		||||
 * @LastEditors: Kane
 | 
			
		||||
 * @LastEditTime: 2023-01-29 10:40:39
 | 
			
		||||
 * @FilePath: \AdminSys\src\main\java\com\cpic\xim\web\filters\cros\CrosFilter.java
 | 
			
		||||
 * @Description: 过滤器,用于对CROS访问进行响应。允许任何来源的访问。
 | 
			
		||||
 * 
 | 
			
		||||
 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
			
		||||
 */
 | 
			
		||||
package com.cpic.xim.web.filters.cros;
 | 
			
		||||
 | 
			
		||||
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 );
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,41 @@
 | 
			
		||||
/*
 | 
			
		||||
 * @Author: Kane
 | 
			
		||||
 * @Date: 2023-01-12 15:01:22
 | 
			
		||||
 * @LastEditors: Kane
 | 
			
		||||
 * @LastEditTime: 2023-01-24 00:21:51
 | 
			
		||||
 * @FilePath: \AdminSys\src\main\java\com\cpic\xim\web\filters\token\TokenFilter.java
 | 
			
		||||
 * @Description: 用于检查token的过滤器
 | 
			
		||||
 * 
 | 
			
		||||
 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
			
		||||
 */
 | 
			
		||||
package com.cpic.xim.web.filters.token;
 | 
			
		||||
 | 
			
		||||
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;
 | 
			
		||||
 | 
			
		||||
@SuppressWarnings( "unused" )
 | 
			
		||||
public class TokenFilter implements Filter
 | 
			
		||||
{
 | 
			
		||||
    /*****************************************************
 | 
			
		||||
     * 对请求的token进行验证。
 | 
			
		||||
     *****************************************************/
 | 
			
		||||
    @Override
 | 
			
		||||
    public void doFilter( ServletRequest req, ServletResponse resp, FilterChain chain )
 | 
			
		||||
            throws ServletException, IOException
 | 
			
		||||
    {
 | 
			
		||||
        HttpServletRequest request = (HttpServletRequest) req;
 | 
			
		||||
        HttpServletResponse response = (HttpServletResponse) resp;
 | 
			
		||||
 | 
			
		||||
        // 验证Token
 | 
			
		||||
        String token = request.getHeader( "Token" );
 | 
			
		||||
 | 
			
		||||
        chain.doFilter( request, response );
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -0,0 +1,71 @@
 | 
			
		||||
/*
 | 
			
		||||
 * @Author: Kane
 | 
			
		||||
 * @Date: 2022-12-15 19:40:12
 | 
			
		||||
 * @LastEditors: Kane
 | 
			
		||||
 * @LastEditTime: 2023-01-23 23:58:26
 | 
			
		||||
 * @FilePath: \AdminSys\src\main\java\com\cpic\xim\web\listener\ContextLoaderListener.java
 | 
			
		||||
 * @Description: 
 | 
			
		||||
 * 
 | 
			
		||||
 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
			
		||||
 */
 | 
			
		||||
package com.cpic.xim.web.listener;
 | 
			
		||||
 | 
			
		||||
import java.io.FileInputStream;
 | 
			
		||||
import java.io.IOException;
 | 
			
		||||
import java.io.InputStreamReader;
 | 
			
		||||
import javax.servlet.ServletContext;
 | 
			
		||||
import javax.servlet.ServletContextEvent;
 | 
			
		||||
import javax.servlet.ServletContextListener;
 | 
			
		||||
import com.fasterxml.jackson.databind.ObjectMapper;
 | 
			
		||||
 | 
			
		||||
@SuppressWarnings(
 | 
			
		||||
{ "unused"} )
 | 
			
		||||
public class ContextLoaderListener implements ServletContextListener
 | 
			
		||||
{
 | 
			
		||||
    private static final int BUFFER_SIZE = 1024;
 | 
			
		||||
    private static final String CONFIG_FILE_CHARSET = "UTF-8";
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public void contextInitialized( ServletContextEvent event )
 | 
			
		||||
    {
 | 
			
		||||
        ServletContext context = event.getServletContext();
 | 
			
		||||
 | 
			
		||||
        String configFileLocation = context.getInitParameter( "config_file_location" );
 | 
			
		||||
 | 
			
		||||
        // loadConfig( configFileLocation );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private void loadConfig( String configFileLocation )
 | 
			
		||||
    {
 | 
			
		||||
        ObjectMapper mapper = new ObjectMapper();
 | 
			
		||||
        FileInputStream configFile = null;
 | 
			
		||||
        InputStreamReader in = null;
 | 
			
		||||
        StringBuilder json = null;
 | 
			
		||||
        char[] buffer = new char[BUFFER_SIZE];
 | 
			
		||||
 | 
			
		||||
        try
 | 
			
		||||
        {
 | 
			
		||||
            configFile = new FileInputStream( configFileLocation );
 | 
			
		||||
        }
 | 
			
		||||
        catch ( IOException exception )
 | 
			
		||||
        {
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
        finally
 | 
			
		||||
        {
 | 
			
		||||
            try
 | 
			
		||||
            {
 | 
			
		||||
                if ( configFile != null )
 | 
			
		||||
                {
 | 
			
		||||
                    configFile.close();
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            catch ( Exception error )
 | 
			
		||||
            {
 | 
			
		||||
                error.printStackTrace();
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										37
									
								
								code/java/后端-用户验证/src/main/webapp/WEB-INF/classes/spring.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										37
									
								
								code/java/后端-用户验证/src/main/webapp/WEB-INF/classes/spring.xml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,37 @@
 | 
			
		||||
<beans xmlns="http://www.springframework.org/schema/beans"
 | 
			
		||||
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 | 
			
		||||
    xmlns:context="http://www.springframework.org/schema/context"
 | 
			
		||||
    xmlns:jdbc="http://www.springframework.org/schema/jdbc"
 | 
			
		||||
    xmlns:jee="http://www.springframework.org/schema/jee"
 | 
			
		||||
    xmlns:tx="http://www.springframework.org/schema/tx"
 | 
			
		||||
    xmlns:aop="http://www.springframework.org/schema/aop"
 | 
			
		||||
    xmlns:mvc="http://www.springframework.org/schema/mvc"
 | 
			
		||||
    xmlns:util="http://www.springframework.org/schema/util"
 | 
			
		||||
    xmlns:jpa="http://www.springframework.org/schema/data/jpa"
 | 
			
		||||
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
 | 
			
		||||
                        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd
 | 
			
		||||
                        http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.2.xsd
 | 
			
		||||
                        http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.2.xsd
 | 
			
		||||
                        http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.2.xsd
 | 
			
		||||
                        http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa-1.3.xsd
 | 
			
		||||
                        http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.2.xsd
 | 
			
		||||
                        http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd
 | 
			
		||||
                        http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.2.xsd">
 | 
			
		||||
 | 
			
		||||
    <context:component-scan base-package="com.cpic.xim" />
 | 
			
		||||
    <mvc:annotation-driven />
 | 
			
		||||
    <mvc:default-servlet-handler />
 | 
			
		||||
 | 
			
		||||
    <!-- <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
 | 
			
		||||
        <property
 | 
			
		||||
    name="prefix" value="/WEB-INF/jsp/" />
 | 
			
		||||
        <property name="suffix" value=".jsp" />
 | 
			
		||||
    </bean> -->
 | 
			
		||||
 | 
			
		||||
    <bean id="multipartResolver"
 | 
			
		||||
        class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
 | 
			
		||||
        <property name="defaultEncoding" value="UTF-8" />
 | 
			
		||||
        <property name="maxUploadSize" value="-1" />
 | 
			
		||||
    </bean>
 | 
			
		||||
 | 
			
		||||
</beans>
 | 
			
		||||
							
								
								
									
										57
									
								
								code/java/后端-用户验证/src/main/webapp/WEB-INF/web.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										57
									
								
								code/java/后端-用户验证/src/main/webapp/WEB-INF/web.xml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,57 @@
 | 
			
		||||
<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>
 | 
			
		||||
  <servlet-mapping>
 | 
			
		||||
    <servlet-name>springmvc</servlet-name>
 | 
			
		||||
    <url-pattern>/account/p13_account_check</url-pattern>
 | 
			
		||||
  </servlet-mapping>
 | 
			
		||||
 | 
			
		||||
  <!-- 用于验证Token的Filter -->
 | 
			
		||||
  <filter>
 | 
			
		||||
    <filter-name>token-filter</filter-name>
 | 
			
		||||
    <filter-class>com.cpic.xim.web.filters.token.TokenFilter</filter-class>
 | 
			
		||||
  </filter>
 | 
			
		||||
  <filter-mapping>
 | 
			
		||||
    <filter-name>token-filter</filter-name>
 | 
			
		||||
    <url-pattern>*.do</url-pattern>
 | 
			
		||||
  </filter-mapping>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  <!-- 用于实现跨域访问的Filter -->
 | 
			
		||||
  <filter>
 | 
			
		||||
    <filter-name>cros-filter</filter-name>
 | 
			
		||||
    <filter-class>com.cpic.xim.web.filters.cros.CrosFilter</filter-class>
 | 
			
		||||
  </filter>
 | 
			
		||||
  <filter-mapping>
 | 
			
		||||
    <filter-name>cros-filter</filter-name>
 | 
			
		||||
    <url-pattern>*</url-pattern>
 | 
			
		||||
  </filter-mapping>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  <!-- 配置文件路径参数 -->
 | 
			
		||||
  <context-param>
 | 
			
		||||
    <param-name>config_file_location</param-name>
 | 
			
		||||
    <param-value>config.xml</param-value>
 | 
			
		||||
  </context-param>
 | 
			
		||||
 | 
			
		||||
  <listener>
 | 
			
		||||
    <listener-class>com.cpic.xim.web.listener.ContextLoaderListener</listener-class>
 | 
			
		||||
  </listener>
 | 
			
		||||
 | 
			
		||||
</web-app>
 | 
			
		||||
							
								
								
									
										68
									
								
								code/java/后端-用户验证/src/main/webapp/css/kane.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										68
									
								
								code/java/后端-用户验证/src/main/webapp/css/kane.css
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,68 @@
 | 
			
		||||
html {
 | 
			
		||||
    --backupground-color: #f7f7f7;
 | 
			
		||||
    --btn-color-blue: #307dbe;
 | 
			
		||||
    --btn-color-yellow: #f7b24d;
 | 
			
		||||
    --btn-color-green: #5bad60;
 | 
			
		||||
    --btn-color-red: #e56651;
 | 
			
		||||
    --btn-font-color: #fff;
 | 
			
		||||
    background-color: #eee;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#root,
 | 
			
		||||
#app {
 | 
			
		||||
    height: 100vh;
 | 
			
		||||
    width: 100vw;
 | 
			
		||||
    position: fixed;
 | 
			
		||||
    padding: 50px;
 | 
			
		||||
    /* font-size: 0; */
 | 
			
		||||
    overflow: auto;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#root,
 | 
			
		||||
#app * + * {
 | 
			
		||||
    margin-top: 15px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
hr {
 | 
			
		||||
    background-color: steelblue;
 | 
			
		||||
    border: none;
 | 
			
		||||
    height: 3px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.test {
 | 
			
		||||
    width: 110vw;
 | 
			
		||||
    height: 100vh;
 | 
			
		||||
    border: 1px solid red;
 | 
			
		||||
    overflow: auto;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
button {
 | 
			
		||||
    padding: 5px 10px;
 | 
			
		||||
    background-color: var(--btn-color-red);
 | 
			
		||||
    color: var(--btn-font-color);
 | 
			
		||||
    width: 10em;
 | 
			
		||||
    border: none;
 | 
			
		||||
    border-radius: 0.25em;
 | 
			
		||||
    font-size: 1.5rem;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
button + button {
 | 
			
		||||
    margin-left: 0.5em;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
button:active {
 | 
			
		||||
    background-color: var(--btn-font-color);
 | 
			
		||||
    color: var(--btn-color-red);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
input {
 | 
			
		||||
    border: none;
 | 
			
		||||
    outline: solid 2px #e56651;
 | 
			
		||||
    font-size: 2rem;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
label {
 | 
			
		||||
    display: inline-block;
 | 
			
		||||
    font-size: 2rem;
 | 
			
		||||
    margin-top: 15px;
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										25
									
								
								code/java/后端-用户验证/src/main/webapp/css/main_frame.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								code/java/后端-用户验证/src/main/webapp/css/main_frame.css
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,25 @@
 | 
			
		||||
#app {
 | 
			
		||||
    width: 100vw;
 | 
			
		||||
    height: 100vh;
 | 
			
		||||
    padding: 0px;
 | 
			
		||||
    margin: 0px;
 | 
			
		||||
    display: flex;
 | 
			
		||||
    flex-direction: column;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#header {
 | 
			
		||||
    flex-basis: 50px;
 | 
			
		||||
    border: 1px solid red;
 | 
			
		||||
    max-height: 50px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#main {
 | 
			
		||||
    flex-grow: 1;
 | 
			
		||||
    border: 1px solid red;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#footer {
 | 
			
		||||
    flex-basis: 100px;
 | 
			
		||||
    max-height: 100px;
 | 
			
		||||
    border: 1px solid red;
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										349
									
								
								code/java/后端-用户验证/src/main/webapp/css/normalize.css
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										349
									
								
								code/java/后端-用户验证/src/main/webapp/css/normalize.css
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,349 @@
 | 
			
		||||
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
 | 
			
		||||
 | 
			
		||||
/* Document
 | 
			
		||||
   ========================================================================== */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 1. Correct the line height in all browsers.
 | 
			
		||||
 * 2. Prevent adjustments of font size after orientation changes in iOS.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
html {
 | 
			
		||||
  line-height: 1.15; /* 1 */
 | 
			
		||||
  -webkit-text-size-adjust: 100%; /* 2 */
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Sections
 | 
			
		||||
   ========================================================================== */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Remove the margin in all browsers.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
body {
 | 
			
		||||
  margin: 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Render the `main` element consistently in IE.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
main {
 | 
			
		||||
  display: block;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Correct the font size and margin on `h1` elements within `section` and
 | 
			
		||||
 * `article` contexts in Chrome, Firefox, and Safari.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
h1 {
 | 
			
		||||
  font-size: 2em;
 | 
			
		||||
  margin: 0.67em 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Grouping content
 | 
			
		||||
   ========================================================================== */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 1. Add the correct box sizing in Firefox.
 | 
			
		||||
 * 2. Show the overflow in Edge and IE.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
hr {
 | 
			
		||||
  box-sizing: content-box; /* 1 */
 | 
			
		||||
  height: 0; /* 1 */
 | 
			
		||||
  overflow: visible; /* 2 */
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 1. Correct the inheritance and scaling of font size in all browsers.
 | 
			
		||||
 * 2. Correct the odd `em` font sizing in all browsers.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
pre {
 | 
			
		||||
  font-family: monospace, monospace; /* 1 */
 | 
			
		||||
  font-size: 1em; /* 2 */
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Text-level semantics
 | 
			
		||||
   ========================================================================== */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Remove the gray background on active links in IE 10.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
a {
 | 
			
		||||
  background-color: transparent;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 1. Remove the bottom border in Chrome 57-
 | 
			
		||||
 * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
abbr[title] {
 | 
			
		||||
  border-bottom: none; /* 1 */
 | 
			
		||||
  text-decoration: underline; /* 2 */
 | 
			
		||||
  text-decoration: underline dotted; /* 2 */
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Add the correct font weight in Chrome, Edge, and Safari.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
b,
 | 
			
		||||
strong {
 | 
			
		||||
  font-weight: bolder;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 1. Correct the inheritance and scaling of font size in all browsers.
 | 
			
		||||
 * 2. Correct the odd `em` font sizing in all browsers.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
code,
 | 
			
		||||
kbd,
 | 
			
		||||
samp {
 | 
			
		||||
  font-family: monospace, monospace; /* 1 */
 | 
			
		||||
  font-size: 1em; /* 2 */
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Add the correct font size in all browsers.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
small {
 | 
			
		||||
  font-size: 80%;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Prevent `sub` and `sup` elements from affecting the line height in
 | 
			
		||||
 * all browsers.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
sub,
 | 
			
		||||
sup {
 | 
			
		||||
  font-size: 75%;
 | 
			
		||||
  line-height: 0;
 | 
			
		||||
  position: relative;
 | 
			
		||||
  vertical-align: baseline;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
sub {
 | 
			
		||||
  bottom: -0.25em;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
sup {
 | 
			
		||||
  top: -0.5em;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Embedded content
 | 
			
		||||
   ========================================================================== */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Remove the border on images inside links in IE 10.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
img {
 | 
			
		||||
  border-style: none;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Forms
 | 
			
		||||
   ========================================================================== */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 1. Change the font styles in all browsers.
 | 
			
		||||
 * 2. Remove the margin in Firefox and Safari.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
button,
 | 
			
		||||
input,
 | 
			
		||||
optgroup,
 | 
			
		||||
select,
 | 
			
		||||
textarea {
 | 
			
		||||
  font-family: inherit; /* 1 */
 | 
			
		||||
  font-size: 100%; /* 1 */
 | 
			
		||||
  line-height: 1.15; /* 1 */
 | 
			
		||||
  margin: 0; /* 2 */
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Show the overflow in IE.
 | 
			
		||||
 * 1. Show the overflow in Edge.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
button,
 | 
			
		||||
input { /* 1 */
 | 
			
		||||
  overflow: visible;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Remove the inheritance of text transform in Edge, Firefox, and IE.
 | 
			
		||||
 * 1. Remove the inheritance of text transform in Firefox.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
button,
 | 
			
		||||
select { /* 1 */
 | 
			
		||||
  text-transform: none;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Correct the inability to style clickable types in iOS and Safari.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
button,
 | 
			
		||||
[type="button"],
 | 
			
		||||
[type="reset"],
 | 
			
		||||
[type="submit"] {
 | 
			
		||||
  -webkit-appearance: button;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Remove the inner border and padding in Firefox.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
button::-moz-focus-inner,
 | 
			
		||||
[type="button"]::-moz-focus-inner,
 | 
			
		||||
[type="reset"]::-moz-focus-inner,
 | 
			
		||||
[type="submit"]::-moz-focus-inner {
 | 
			
		||||
  border-style: none;
 | 
			
		||||
  padding: 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Restore the focus styles unset by the previous rule.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
button:-moz-focusring,
 | 
			
		||||
[type="button"]:-moz-focusring,
 | 
			
		||||
[type="reset"]:-moz-focusring,
 | 
			
		||||
[type="submit"]:-moz-focusring {
 | 
			
		||||
  outline: 1px dotted ButtonText;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Correct the padding in Firefox.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
fieldset {
 | 
			
		||||
  padding: 0.35em 0.75em 0.625em;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 1. Correct the text wrapping in Edge and IE.
 | 
			
		||||
 * 2. Correct the color inheritance from `fieldset` elements in IE.
 | 
			
		||||
 * 3. Remove the padding so developers are not caught out when they zero out
 | 
			
		||||
 *    `fieldset` elements in all browsers.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
legend {
 | 
			
		||||
  box-sizing: border-box; /* 1 */
 | 
			
		||||
  color: inherit; /* 2 */
 | 
			
		||||
  display: table; /* 1 */
 | 
			
		||||
  max-width: 100%; /* 1 */
 | 
			
		||||
  padding: 0; /* 3 */
 | 
			
		||||
  white-space: normal; /* 1 */
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Add the correct vertical alignment in Chrome, Firefox, and Opera.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
progress {
 | 
			
		||||
  vertical-align: baseline;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Remove the default vertical scrollbar in IE 10+.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
textarea {
 | 
			
		||||
  overflow: auto;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 1. Add the correct box sizing in IE 10.
 | 
			
		||||
 * 2. Remove the padding in IE 10.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
[type="checkbox"],
 | 
			
		||||
[type="radio"] {
 | 
			
		||||
  box-sizing: border-box; /* 1 */
 | 
			
		||||
  padding: 0; /* 2 */
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Correct the cursor style of increment and decrement buttons in Chrome.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
[type="number"]::-webkit-inner-spin-button,
 | 
			
		||||
[type="number"]::-webkit-outer-spin-button {
 | 
			
		||||
  height: auto;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 1. Correct the odd appearance in Chrome and Safari.
 | 
			
		||||
 * 2. Correct the outline style in Safari.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
[type="search"] {
 | 
			
		||||
  -webkit-appearance: textfield; /* 1 */
 | 
			
		||||
  outline-offset: -2px; /* 2 */
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Remove the inner padding in Chrome and Safari on macOS.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
[type="search"]::-webkit-search-decoration {
 | 
			
		||||
  -webkit-appearance: none;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 1. Correct the inability to style clickable types in iOS and Safari.
 | 
			
		||||
 * 2. Change font properties to `inherit` in Safari.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
::-webkit-file-upload-button {
 | 
			
		||||
  -webkit-appearance: button; /* 1 */
 | 
			
		||||
  font: inherit; /* 2 */
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Interactive
 | 
			
		||||
   ========================================================================== */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Add the correct display in Edge, IE 10+, and Firefox.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
details {
 | 
			
		||||
  display: block;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Add the correct display in all browsers.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
summary {
 | 
			
		||||
  display: list-item;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Misc
 | 
			
		||||
   ========================================================================== */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Add the correct display in IE 10+.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
template {
 | 
			
		||||
  display: none;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Add the correct display in IE 10.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
[hidden] {
 | 
			
		||||
  display: none;
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										11
									
								
								code/java/后端-用户验证/src/main/webapp/css/product_form.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								code/java/后端-用户验证/src/main/webapp/css/product_form.css
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,11 @@
 | 
			
		||||
.panel {
 | 
			
		||||
    display: flex;
 | 
			
		||||
    justify-content: center;
 | 
			
		||||
    align-items: center;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.main_form {
 | 
			
		||||
    height: 50vh;
 | 
			
		||||
    width: 50vw;
 | 
			
		||||
    border: 1px solid red;
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										20
									
								
								code/java/后端-用户验证/src/main/webapp/css/root.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								code/java/后端-用户验证/src/main/webapp/css/root.css
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,20 @@
 | 
			
		||||
:root {
 | 
			
		||||
    font-size: 1em;
 | 
			
		||||
    box-sizing: border-box;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
*,
 | 
			
		||||
*::before,
 | 
			
		||||
*::after {
 | 
			
		||||
    margin: 0;
 | 
			
		||||
    padding: 0;
 | 
			
		||||
    box-sizing: inherit;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
body {
 | 
			
		||||
    font-family: Arial, Helvetica, sans-serif;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.pointer {
 | 
			
		||||
    cursor: pointer;
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										17
									
								
								code/java/后端-用户验证/src/main/webapp/css/test.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								code/java/后端-用户验证/src/main/webapp/css/test.css
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,17 @@
 | 
			
		||||
a,
 | 
			
		||||
p {
 | 
			
		||||
    padding: 5rem;
 | 
			
		||||
    border: 1px solid red;
 | 
			
		||||
    line-height: 2rem;
 | 
			
		||||
    margin: 2em;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.warp_test {
 | 
			
		||||
    width: 5rem;
 | 
			
		||||
    border: 1px solid red;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
ol,
 | 
			
		||||
li {
 | 
			
		||||
    background-color: cornflowerblue;
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										23
									
								
								code/java/后端-用户验证/src/main/webapp/index.jsp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								code/java/后端-用户验证/src/main/webapp/index.jsp
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,23 @@
 | 
			
		||||
<%-- /*
 | 
			
		||||
 * @Author: Kane
 | 
			
		||||
 * @Date: 2022-10-21 00:14:43
 | 
			
		||||
 * @LastEditors: Kane
 | 
			
		||||
 * @LastEditTime: 2022-10-21 00:16:48
 | 
			
		||||
 * @FilePath: \car_dealer\src\main\webapp\test.jsp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
 * 
 | 
			
		||||
 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
			
		||||
 */ --%>
 | 
			
		||||
<%@ page contentType="text/html;charset=UTF-8" %>
 | 
			
		||||
<!DOCTYPE html>
 | 
			
		||||
<html lang="en">
 | 
			
		||||
<head>
 | 
			
		||||
    <meta charset="UTF-8">
 | 
			
		||||
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
 | 
			
		||||
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
 | 
			
		||||
    <title>Document</title>
 | 
			
		||||
</head>
 | 
			
		||||
<body>
 | 
			
		||||
    
 | 
			
		||||
</body>
 | 
			
		||||
</html>
 | 
			
		||||
@@ -0,0 +1,25 @@
 | 
			
		||||
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:jdbc="http://www.springframework.org/schema/jdbc" xmlns:jee="http://www.springframework.org/schema/jee" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:util="http://www.springframework.org/schema/util" xmlns:jpa="http://www.springframework.org/schema/data/jpa" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
 | 
			
		||||
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd
 | 
			
		||||
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.2.xsd
 | 
			
		||||
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.2.xsd
 | 
			
		||||
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.2.xsd
 | 
			
		||||
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa-1.3.xsd
 | 
			
		||||
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.2.xsd
 | 
			
		||||
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd
 | 
			
		||||
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.2.xsd">
 | 
			
		||||
 | 
			
		||||
    <context:component-scan base-package="com.cpic.xim" />
 | 
			
		||||
    <mvc:annotation-driven />
 | 
			
		||||
    <mvc:default-servlet-handler />
 | 
			
		||||
 | 
			
		||||
    <!-- <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
 | 
			
		||||
        <property name="prefix" value="/WEB-INF/jsp/" />
 | 
			
		||||
        <property name="suffix" value=".jsp" />
 | 
			
		||||
    </bean> -->
 | 
			
		||||
 | 
			
		||||
    <bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
 | 
			
		||||
        <property name="defaultEncoding" value="UTF-8" />
 | 
			
		||||
        <property name="maxUploadSize" value="-1" />
 | 
			
		||||
    </bean>
 | 
			
		||||
 | 
			
		||||
</beans>
 | 
			
		||||
							
								
								
									
										49
									
								
								code/java/后端-用户验证/target/admin-system/WEB-INF/web.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										49
									
								
								code/java/后端-用户验证/target/admin-system/WEB-INF/web.xml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,49 @@
 | 
			
		||||
<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.cpic.xim.web.filters.cros.CrosFilter</filter-class>
 | 
			
		||||
  </filter>
 | 
			
		||||
  <filter-mapping>
 | 
			
		||||
    <filter-name>cros-filter</filter-name>
 | 
			
		||||
    <url-pattern>*.do</url-pattern>
 | 
			
		||||
  </filter-mapping>
 | 
			
		||||
 | 
			
		||||
  <filter>
 | 
			
		||||
    <filter-name>token-filter</filter-name>
 | 
			
		||||
    <filter-class>com.cpic.xim.web.filters.token.TokenFilter</filter-class>
 | 
			
		||||
  </filter>
 | 
			
		||||
  <filter-mapping>
 | 
			
		||||
    <filter-name>token-filter</filter-name>
 | 
			
		||||
    <url-pattern>*.do</url-pattern>
 | 
			
		||||
  </filter-mapping>
 | 
			
		||||
 | 
			
		||||
  <!-- 配置文件路径参数 -->
 | 
			
		||||
  <context-param>
 | 
			
		||||
    <param-name>config_file_location</param-name>
 | 
			
		||||
    <param-value>config.xml</param-value>
 | 
			
		||||
  </context-param>
 | 
			
		||||
 | 
			
		||||
  <listener>
 | 
			
		||||
    <listener-class>com.cpic.xim.web.listener.ContextLoaderListener</listener-class>
 | 
			
		||||
  </listener>
 | 
			
		||||
 | 
			
		||||
</web-app>
 | 
			
		||||
							
								
								
									
										68
									
								
								code/java/后端-用户验证/target/admin-system/css/kane.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										68
									
								
								code/java/后端-用户验证/target/admin-system/css/kane.css
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,68 @@
 | 
			
		||||
html {
 | 
			
		||||
    --backupground-color: #f7f7f7;
 | 
			
		||||
    --btn-color-blue: #307dbe;
 | 
			
		||||
    --btn-color-yellow: #f7b24d;
 | 
			
		||||
    --btn-color-green: #5bad60;
 | 
			
		||||
    --btn-color-red: #e56651;
 | 
			
		||||
    --btn-font-color: #fff;
 | 
			
		||||
    background-color: #eee;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#root,
 | 
			
		||||
#app {
 | 
			
		||||
    height: 100vh;
 | 
			
		||||
    width: 100vw;
 | 
			
		||||
    position: fixed;
 | 
			
		||||
    padding: 50px;
 | 
			
		||||
    /* font-size: 0; */
 | 
			
		||||
    overflow: auto;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#root,
 | 
			
		||||
#app * + * {
 | 
			
		||||
    margin-top: 15px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
hr {
 | 
			
		||||
    background-color: steelblue;
 | 
			
		||||
    border: none;
 | 
			
		||||
    height: 3px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.test {
 | 
			
		||||
    width: 110vw;
 | 
			
		||||
    height: 100vh;
 | 
			
		||||
    border: 1px solid red;
 | 
			
		||||
    overflow: auto;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
button {
 | 
			
		||||
    padding: 5px 10px;
 | 
			
		||||
    background-color: var(--btn-color-red);
 | 
			
		||||
    color: var(--btn-font-color);
 | 
			
		||||
    width: 10em;
 | 
			
		||||
    border: none;
 | 
			
		||||
    border-radius: 0.25em;
 | 
			
		||||
    font-size: 1.5rem;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
button + button {
 | 
			
		||||
    margin-left: 0.5em;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
button:active {
 | 
			
		||||
    background-color: var(--btn-font-color);
 | 
			
		||||
    color: var(--btn-color-red);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
input {
 | 
			
		||||
    border: none;
 | 
			
		||||
    outline: solid 2px #e56651;
 | 
			
		||||
    font-size: 2rem;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
label {
 | 
			
		||||
    display: inline-block;
 | 
			
		||||
    font-size: 2rem;
 | 
			
		||||
    margin-top: 15px;
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										25
									
								
								code/java/后端-用户验证/target/admin-system/css/main_frame.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								code/java/后端-用户验证/target/admin-system/css/main_frame.css
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,25 @@
 | 
			
		||||
#app {
 | 
			
		||||
    width: 100vw;
 | 
			
		||||
    height: 100vh;
 | 
			
		||||
    padding: 0px;
 | 
			
		||||
    margin: 0px;
 | 
			
		||||
    display: flex;
 | 
			
		||||
    flex-direction: column;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#header {
 | 
			
		||||
    flex-basis: 50px;
 | 
			
		||||
    border: 1px solid red;
 | 
			
		||||
    max-height: 50px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#main {
 | 
			
		||||
    flex-grow: 1;
 | 
			
		||||
    border: 1px solid red;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#footer {
 | 
			
		||||
    flex-basis: 100px;
 | 
			
		||||
    max-height: 100px;
 | 
			
		||||
    border: 1px solid red;
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										349
									
								
								code/java/后端-用户验证/target/admin-system/css/normalize.css
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										349
									
								
								code/java/后端-用户验证/target/admin-system/css/normalize.css
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,349 @@
 | 
			
		||||
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
 | 
			
		||||
 | 
			
		||||
/* Document
 | 
			
		||||
   ========================================================================== */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 1. Correct the line height in all browsers.
 | 
			
		||||
 * 2. Prevent adjustments of font size after orientation changes in iOS.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
html {
 | 
			
		||||
  line-height: 1.15; /* 1 */
 | 
			
		||||
  -webkit-text-size-adjust: 100%; /* 2 */
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Sections
 | 
			
		||||
   ========================================================================== */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Remove the margin in all browsers.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
body {
 | 
			
		||||
  margin: 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Render the `main` element consistently in IE.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
main {
 | 
			
		||||
  display: block;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Correct the font size and margin on `h1` elements within `section` and
 | 
			
		||||
 * `article` contexts in Chrome, Firefox, and Safari.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
h1 {
 | 
			
		||||
  font-size: 2em;
 | 
			
		||||
  margin: 0.67em 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Grouping content
 | 
			
		||||
   ========================================================================== */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 1. Add the correct box sizing in Firefox.
 | 
			
		||||
 * 2. Show the overflow in Edge and IE.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
hr {
 | 
			
		||||
  box-sizing: content-box; /* 1 */
 | 
			
		||||
  height: 0; /* 1 */
 | 
			
		||||
  overflow: visible; /* 2 */
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 1. Correct the inheritance and scaling of font size in all browsers.
 | 
			
		||||
 * 2. Correct the odd `em` font sizing in all browsers.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
pre {
 | 
			
		||||
  font-family: monospace, monospace; /* 1 */
 | 
			
		||||
  font-size: 1em; /* 2 */
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Text-level semantics
 | 
			
		||||
   ========================================================================== */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Remove the gray background on active links in IE 10.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
a {
 | 
			
		||||
  background-color: transparent;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 1. Remove the bottom border in Chrome 57-
 | 
			
		||||
 * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
abbr[title] {
 | 
			
		||||
  border-bottom: none; /* 1 */
 | 
			
		||||
  text-decoration: underline; /* 2 */
 | 
			
		||||
  text-decoration: underline dotted; /* 2 */
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Add the correct font weight in Chrome, Edge, and Safari.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
b,
 | 
			
		||||
strong {
 | 
			
		||||
  font-weight: bolder;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 1. Correct the inheritance and scaling of font size in all browsers.
 | 
			
		||||
 * 2. Correct the odd `em` font sizing in all browsers.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
code,
 | 
			
		||||
kbd,
 | 
			
		||||
samp {
 | 
			
		||||
  font-family: monospace, monospace; /* 1 */
 | 
			
		||||
  font-size: 1em; /* 2 */
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Add the correct font size in all browsers.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
small {
 | 
			
		||||
  font-size: 80%;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Prevent `sub` and `sup` elements from affecting the line height in
 | 
			
		||||
 * all browsers.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
sub,
 | 
			
		||||
sup {
 | 
			
		||||
  font-size: 75%;
 | 
			
		||||
  line-height: 0;
 | 
			
		||||
  position: relative;
 | 
			
		||||
  vertical-align: baseline;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
sub {
 | 
			
		||||
  bottom: -0.25em;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
sup {
 | 
			
		||||
  top: -0.5em;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Embedded content
 | 
			
		||||
   ========================================================================== */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Remove the border on images inside links in IE 10.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
img {
 | 
			
		||||
  border-style: none;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Forms
 | 
			
		||||
   ========================================================================== */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 1. Change the font styles in all browsers.
 | 
			
		||||
 * 2. Remove the margin in Firefox and Safari.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
button,
 | 
			
		||||
input,
 | 
			
		||||
optgroup,
 | 
			
		||||
select,
 | 
			
		||||
textarea {
 | 
			
		||||
  font-family: inherit; /* 1 */
 | 
			
		||||
  font-size: 100%; /* 1 */
 | 
			
		||||
  line-height: 1.15; /* 1 */
 | 
			
		||||
  margin: 0; /* 2 */
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Show the overflow in IE.
 | 
			
		||||
 * 1. Show the overflow in Edge.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
button,
 | 
			
		||||
input { /* 1 */
 | 
			
		||||
  overflow: visible;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Remove the inheritance of text transform in Edge, Firefox, and IE.
 | 
			
		||||
 * 1. Remove the inheritance of text transform in Firefox.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
button,
 | 
			
		||||
select { /* 1 */
 | 
			
		||||
  text-transform: none;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Correct the inability to style clickable types in iOS and Safari.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
button,
 | 
			
		||||
[type="button"],
 | 
			
		||||
[type="reset"],
 | 
			
		||||
[type="submit"] {
 | 
			
		||||
  -webkit-appearance: button;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Remove the inner border and padding in Firefox.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
button::-moz-focus-inner,
 | 
			
		||||
[type="button"]::-moz-focus-inner,
 | 
			
		||||
[type="reset"]::-moz-focus-inner,
 | 
			
		||||
[type="submit"]::-moz-focus-inner {
 | 
			
		||||
  border-style: none;
 | 
			
		||||
  padding: 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Restore the focus styles unset by the previous rule.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
button:-moz-focusring,
 | 
			
		||||
[type="button"]:-moz-focusring,
 | 
			
		||||
[type="reset"]:-moz-focusring,
 | 
			
		||||
[type="submit"]:-moz-focusring {
 | 
			
		||||
  outline: 1px dotted ButtonText;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Correct the padding in Firefox.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
fieldset {
 | 
			
		||||
  padding: 0.35em 0.75em 0.625em;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 1. Correct the text wrapping in Edge and IE.
 | 
			
		||||
 * 2. Correct the color inheritance from `fieldset` elements in IE.
 | 
			
		||||
 * 3. Remove the padding so developers are not caught out when they zero out
 | 
			
		||||
 *    `fieldset` elements in all browsers.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
legend {
 | 
			
		||||
  box-sizing: border-box; /* 1 */
 | 
			
		||||
  color: inherit; /* 2 */
 | 
			
		||||
  display: table; /* 1 */
 | 
			
		||||
  max-width: 100%; /* 1 */
 | 
			
		||||
  padding: 0; /* 3 */
 | 
			
		||||
  white-space: normal; /* 1 */
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Add the correct vertical alignment in Chrome, Firefox, and Opera.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
progress {
 | 
			
		||||
  vertical-align: baseline;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Remove the default vertical scrollbar in IE 10+.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
textarea {
 | 
			
		||||
  overflow: auto;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 1. Add the correct box sizing in IE 10.
 | 
			
		||||
 * 2. Remove the padding in IE 10.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
[type="checkbox"],
 | 
			
		||||
[type="radio"] {
 | 
			
		||||
  box-sizing: border-box; /* 1 */
 | 
			
		||||
  padding: 0; /* 2 */
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Correct the cursor style of increment and decrement buttons in Chrome.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
[type="number"]::-webkit-inner-spin-button,
 | 
			
		||||
[type="number"]::-webkit-outer-spin-button {
 | 
			
		||||
  height: auto;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 1. Correct the odd appearance in Chrome and Safari.
 | 
			
		||||
 * 2. Correct the outline style in Safari.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
[type="search"] {
 | 
			
		||||
  -webkit-appearance: textfield; /* 1 */
 | 
			
		||||
  outline-offset: -2px; /* 2 */
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Remove the inner padding in Chrome and Safari on macOS.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
[type="search"]::-webkit-search-decoration {
 | 
			
		||||
  -webkit-appearance: none;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 1. Correct the inability to style clickable types in iOS and Safari.
 | 
			
		||||
 * 2. Change font properties to `inherit` in Safari.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
::-webkit-file-upload-button {
 | 
			
		||||
  -webkit-appearance: button; /* 1 */
 | 
			
		||||
  font: inherit; /* 2 */
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Interactive
 | 
			
		||||
   ========================================================================== */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Add the correct display in Edge, IE 10+, and Firefox.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
details {
 | 
			
		||||
  display: block;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Add the correct display in all browsers.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
summary {
 | 
			
		||||
  display: list-item;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Misc
 | 
			
		||||
   ========================================================================== */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Add the correct display in IE 10+.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
template {
 | 
			
		||||
  display: none;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Add the correct display in IE 10.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
[hidden] {
 | 
			
		||||
  display: none;
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										11
									
								
								code/java/后端-用户验证/target/admin-system/css/product_form.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								code/java/后端-用户验证/target/admin-system/css/product_form.css
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,11 @@
 | 
			
		||||
.panel {
 | 
			
		||||
    display: flex;
 | 
			
		||||
    justify-content: center;
 | 
			
		||||
    align-items: center;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.main_form {
 | 
			
		||||
    height: 50vh;
 | 
			
		||||
    width: 50vw;
 | 
			
		||||
    border: 1px solid red;
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										20
									
								
								code/java/后端-用户验证/target/admin-system/css/root.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								code/java/后端-用户验证/target/admin-system/css/root.css
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,20 @@
 | 
			
		||||
:root {
 | 
			
		||||
    font-size: 1em;
 | 
			
		||||
    box-sizing: border-box;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
*,
 | 
			
		||||
*::before,
 | 
			
		||||
*::after {
 | 
			
		||||
    margin: 0;
 | 
			
		||||
    padding: 0;
 | 
			
		||||
    box-sizing: inherit;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
body {
 | 
			
		||||
    font-family: Arial, Helvetica, sans-serif;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.pointer {
 | 
			
		||||
    cursor: pointer;
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										17
									
								
								code/java/后端-用户验证/target/admin-system/css/test.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								code/java/后端-用户验证/target/admin-system/css/test.css
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,17 @@
 | 
			
		||||
a,
 | 
			
		||||
p {
 | 
			
		||||
    padding: 5rem;
 | 
			
		||||
    border: 1px solid red;
 | 
			
		||||
    line-height: 2rem;
 | 
			
		||||
    margin: 2em;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.warp_test {
 | 
			
		||||
    width: 5rem;
 | 
			
		||||
    border: 1px solid red;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
ol,
 | 
			
		||||
li {
 | 
			
		||||
    background-color: cornflowerblue;
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										23
									
								
								code/java/后端-用户验证/target/admin-system/index.jsp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								code/java/后端-用户验证/target/admin-system/index.jsp
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,23 @@
 | 
			
		||||
<%-- /*
 | 
			
		||||
 * @Author: Kane
 | 
			
		||||
 * @Date: 2022-10-21 00:14:43
 | 
			
		||||
 * @LastEditors: Kane
 | 
			
		||||
 * @LastEditTime: 2022-10-21 00:16:48
 | 
			
		||||
 * @FilePath: \car_dealer\src\main\webapp\test.jsp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
 * 
 | 
			
		||||
 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
			
		||||
 */ --%>
 | 
			
		||||
<%@ page contentType="text/html;charset=UTF-8" %>
 | 
			
		||||
<!DOCTYPE html>
 | 
			
		||||
<html lang="en">
 | 
			
		||||
<head>
 | 
			
		||||
    <meta charset="UTF-8">
 | 
			
		||||
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
 | 
			
		||||
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
 | 
			
		||||
    <title>Document</title>
 | 
			
		||||
</head>
 | 
			
		||||
<body>
 | 
			
		||||
    
 | 
			
		||||
</body>
 | 
			
		||||
</html>
 | 
			
		||||
							
								
								
									
										4
									
								
								code/java/后端-用户验证/target/maven-archiver/pom.properties
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								code/java/后端-用户验证/target/maven-archiver/pom.properties
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,4 @@
 | 
			
		||||
#Created by Apache Maven 3.8.6
 | 
			
		||||
artifactId=admin-system
 | 
			
		||||
groupId=com.cpic.xim
 | 
			
		||||
version=1.0-SNAPSHOT
 | 
			
		||||
@@ -0,0 +1,11 @@
 | 
			
		||||
com\cpic\xim\myutils\config\json\ConfigLoader.class
 | 
			
		||||
com\cpic\xim\web\controllers\account\P13AccountCheckResult.class
 | 
			
		||||
com\cpic\xim\myutils\config\json\AppConfig.class
 | 
			
		||||
com\cpic\xim\web\filters\cros\CrosFilter.class
 | 
			
		||||
com\cpic\xim\web\listener\ContextLoaderListener.class
 | 
			
		||||
com\cpic\xim\myutils\config\json\DatabaseConfig.class
 | 
			
		||||
com\cpic\xim\web\filters\token\TokenFilter.class
 | 
			
		||||
com\cpic\xim\web\controllers\account\P13AccountCheckController.class
 | 
			
		||||
com\cpic\xim\web\controllers\account\P13AccountCheckRequest.class
 | 
			
		||||
com\cpic\xim\myutils\account\CpicXIMStaffInfo.class
 | 
			
		||||
com\cpic\xim\myutils\account\LdapAccountCheck.class
 | 
			
		||||
@@ -0,0 +1,11 @@
 | 
			
		||||
F:\练手代码\vue-learning\企业级管理系统\java\AdminSys\src\main\java\com\cpic\xim\web\filters\token\TokenFilter.java
 | 
			
		||||
F:\练手代码\vue-learning\企业级管理系统\java\AdminSys\src\main\java\com\cpic\xim\web\controllers\account\P13AccountCheckResult.java
 | 
			
		||||
F:\练手代码\vue-learning\企业级管理系统\java\AdminSys\src\main\java\com\cpic\xim\web\controllers\account\P13AccountCheckRequest.java
 | 
			
		||||
F:\练手代码\vue-learning\企业级管理系统\java\AdminSys\src\main\java\com\cpic\xim\web\controllers\account\P13AccountCheckController.java
 | 
			
		||||
F:\练手代码\vue-learning\企业级管理系统\java\AdminSys\src\main\java\com\cpic\xim\web\filters\cros\CrosFilter.java
 | 
			
		||||
F:\练手代码\vue-learning\企业级管理系统\java\AdminSys\src\main\java\com\cpic\xim\myutils\account\CpicXIMStaffInfo.java
 | 
			
		||||
F:\练手代码\vue-learning\企业级管理系统\java\AdminSys\src\main\java\com\cpic\xim\myutils\account\LdapAccountCheck.java
 | 
			
		||||
F:\练手代码\vue-learning\企业级管理系统\java\AdminSys\src\main\java\com\cpic\xim\myutils\config\json\AppConfig.java
 | 
			
		||||
F:\练手代码\vue-learning\企业级管理系统\java\AdminSys\src\main\java\com\cpic\xim\web\listener\ContextLoaderListener.java
 | 
			
		||||
F:\练手代码\vue-learning\企业级管理系统\java\AdminSys\src\main\java\com\cpic\xim\myutils\config\json\DatabaseConfig.java
 | 
			
		||||
F:\练手代码\vue-learning\企业级管理系统\java\AdminSys\src\main\java\com\cpic\xim\myutils\config\json\ConfigLoader.java
 | 
			
		||||
@@ -0,0 +1,2 @@
 | 
			
		||||
com\cpic\xim\myutils\account\CpicXIMStaffInfoTest.class
 | 
			
		||||
com\cpic\xim\myutils\account\LdapAccountCheckTest.class
 | 
			
		||||
@@ -0,0 +1,2 @@
 | 
			
		||||
F:\练手代码\vue-learning\企业级管理系统\java\AdminSys\src\test\java\com\cpic\xim\myutils\account\CpicXIMStaffInfoTest.java
 | 
			
		||||
F:\练手代码\vue-learning\企业级管理系统\java\AdminSys\src\test\java\com\cpic\xim\myutils\account\LdapAccountCheckTest.java
 | 
			
		||||
		Reference in New Issue
	
	Block a user