将springmvc升级到6.2.4。

This commit is contained in:
Kane Wang 2025-05-07 14:29:01 +08:00
parent 5a3b118f02
commit 7160a58245
5 changed files with 79 additions and 51 deletions

View File

@ -13,12 +13,20 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<spring.version>5.3.24</spring.version>
<spring.version>6.2.4</spring.version>
<log4j.version>2.24.3</log4j.version>
<jackson.version>2.18.3</jackson.version>
<!-- <spring.version>6.0.8</spring.version> -->
</properties>
<dependencies>
<!-- https://mvnrepository.com/artifact/junit/junit -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>2.0.17</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
@ -48,49 +56,64 @@
<version>${spring.version}</version>
</dependency>
<dependency>
<!-- <dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>4.0.1</version>
<scope>provided</scope>
</dependency> -->
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>6.1.0</version>
<scope>provided</scope>
</dependency>
<!--文件上传依赖的两个jar包-->
<!-- log4j -->
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.5</version>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j2-impl</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.11.0</version>
<groupId>org.apache.directory.studio</groupId>
<artifactId>org.apache.commons.codec</artifactId>
<version>1.8</version>
</dependency>
<!-- jackson -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.14.2</version>
<version>${jackson.version}</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>
<version>${jackson.version}</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>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc8</artifactId>
<version>19.3.0.0.0</version>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<version>9.2.0</version>
</dependency>
<dependency>

View File

@ -1,8 +1,12 @@
/*
* @Author: Kane
*
* @Date: 2023-05-25 15:26:09
*
* @LastEditors: Kane
*
* @FilePath: /NewCitizenQueryResult/src/main/java/com/cpic/xim/utils/newcitizen/NewCitizenUitls.java
*
* @Description: 新市民认证相关的工具方法
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
@ -35,16 +39,18 @@ import com.fasterxml.jackson.databind.ObjectMapper;
public class NewCitizenUitls
{
// 请求地址
private static String identifyURL = "https://api.xmcic.cn:51888/government/economic/352";
private static String identifyURL = "https://api.xmcic.cn:8443/government/economic/352";
/**
* 新市民验证
*
* @param idCardNo 身份证号码
* @param name 姓名
* @return
* @throws Exception
*/
public static IdentifyResult identifyNewCitizen( String idCardNo, String name ) throws Exception
public static IdentifyResult identifyNewCitizen( String idCardNo, String name )
throws Exception
{
String secretKey = EncryptionParameters.getSecretKey();
String key = EncryptionParameters.getKey();
@ -123,7 +129,8 @@ public class NewCitizenUitls
class ResponseResult
{
public ResponseResult()
{}
{
}
public String getCode()
{
@ -178,4 +185,3 @@ class ResponseResult
private String seqNo;
}

View File

@ -10,7 +10,7 @@
package com.cpic.xim.web.controllers.NewCitizen;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

View File

@ -11,13 +11,13 @@
package com.cpic.xim.web.filters;
import java.io.IOException;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.Filter;
import jakarta.servlet.FilterChain;
import jakarta.servlet.ServletException;
import jakarta.servlet.ServletRequest;
import jakarta.servlet.ServletResponse;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.http.HttpMethod;
public class CrosFilter implements Filter

View File

@ -17,21 +17,20 @@
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 />
<context:component-scan base-package="com.cpic.xim" />
<mvc:default-servlet-handler />
<!-- <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property
name="prefix" value="/WEB-INF/jsp/" />
<property name="suffix" value=".jsp" />
</bean> -->
</bean>
<bean id="multipartResolver"
<!-- <bean id="multipartResolver"
class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
<property name="defaultEncoding" value="UTF-8" />
<property name="maxUploadSize" value="-1" />
</bean>
</bean> -->
</beans>