You've already forked FrameTour-BE
jvm21!
This commit is contained in:
27
pom.xml
27
pom.xml
@ -5,33 +5,38 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.7.18</version>
|
||||
<version>3.1.4</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
<groupId>com.ycwl</groupId>
|
||||
<artifactId>basic</artifactId>
|
||||
<artifactId>basic21</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>liuying</name>
|
||||
<description>流影</description>
|
||||
|
||||
|
||||
<properties>
|
||||
<java.version>8</java.version>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
<mybatisplus.boot.starter.version>3.4.0</mybatisplus.boot.starter.version>
|
||||
<java.version>21</java.version>
|
||||
<maven.compiler.source>21</maven.compiler.source>
|
||||
<maven.compiler.target>21</maven.compiler.target>
|
||||
<hutool-all.version>5.8.24</hutool-all.version>
|
||||
<mysql-connector.version>8.0.33</mysql-connector.version>
|
||||
<fastjson.version>1.2.83</fastjson.version>
|
||||
<knife4j-spring-boot-starter.version>2.0.7</knife4j-spring-boot-starter.version>
|
||||
<pagehelper.version>5.3.1</pagehelper.version>
|
||||
<tomcat.version>9.0.102</tomcat.version>
|
||||
<!--跳过单元测试-->
|
||||
<skipTests>true</skipTests>
|
||||
</properties>
|
||||
|
||||
|
||||
<dependencies>
|
||||
<!-- 添加 jakarta.servlet-api 依赖 -->
|
||||
<dependency>
|
||||
<groupId>jakarta.servlet</groupId>
|
||||
<artifactId>jakarta.servlet-api</artifactId>
|
||||
<version>6.0.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<!-- 微信支付 -->
|
||||
<dependency>
|
||||
<groupId>com.github.wechatpay-apiv3</groupId>
|
||||
@ -85,7 +90,7 @@
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||
<version>${mybatisplus.boot.starter.version}</version>
|
||||
<version>3.5.5</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 引入lombok工具 -->
|
||||
@ -167,19 +172,19 @@
|
||||
<dependency>
|
||||
<groupId>com.amazonaws</groupId>
|
||||
<artifactId>aws-java-sdk-core</artifactId>
|
||||
<version>1.11.24</version>
|
||||
<version>1.12.773</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.amazonaws</groupId>
|
||||
<artifactId>aws-java-sdk-s3</artifactId>
|
||||
<version>1.11.24</version>
|
||||
<version>1.12.773</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 阿里云人脸识别 -->
|
||||
<dependency>
|
||||
<groupId>com.aliyun</groupId>
|
||||
<artifactId>aliyun-java-sdk-core</artifactId>
|
||||
<version>4.6.1</version>
|
||||
<version>4.6.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.aliyun</groupId>
|
||||
|
@ -13,8 +13,8 @@ import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashMap;
|
||||
|
@ -31,7 +31,7 @@ import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.Enumeration;
|
||||
|
@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import java.io.IOException;
|
||||
import java.security.GeneralSecurityException;
|
||||
|
||||
|
@ -7,8 +7,8 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
|
@ -52,7 +52,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import java.io.IOException;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
|
@ -10,7 +10,7 @@ import org.springframework.http.converter.HttpMessageNotReadableException;
|
||||
import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||
import org.springframework.web.bind.annotation.RestControllerAdvice;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
|
@ -15,18 +15,18 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.method.HandlerMethod;
|
||||
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
|
||||
import org.springframework.web.servlet.HandlerInterceptor;
|
||||
|
||||
import javax.servlet.http.Cookie;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.http.Cookie;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
public class AuthInterceptor extends HandlerInterceptorAdapter {
|
||||
public class AuthInterceptor implements HandlerInterceptor {
|
||||
|
||||
@Autowired
|
||||
RedisTemplate redisTemplate;
|
||||
@ -34,7 +34,7 @@ public class AuthInterceptor extends HandlerInterceptorAdapter {
|
||||
@Override
|
||||
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
|
||||
if (!(handler instanceof HandlerMethod)) {
|
||||
return super.preHandle(request, response, handler);
|
||||
return true;
|
||||
}
|
||||
String requestURI = request.getRequestURI();
|
||||
|
||||
@ -45,7 +45,7 @@ public class AuthInterceptor extends HandlerInterceptorAdapter {
|
||||
IgnoreToken ignoreMethodToken = handlerMethod.getMethodAnnotation(IgnoreToken.class);
|
||||
if (ignoreClassToken != null || ignoreMethodToken != null) {
|
||||
// 放行
|
||||
return super.preHandle(request, response, handler);
|
||||
return true;
|
||||
}
|
||||
|
||||
// 放行白名单
|
||||
@ -113,7 +113,6 @@ public class AuthInterceptor extends HandlerInterceptorAdapter {
|
||||
@Override
|
||||
public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception {
|
||||
BaseContextHandler.remove();
|
||||
super.afterCompletion(request, response, handler, ex);
|
||||
}
|
||||
|
||||
public String getToken(HttpServletRequest request) {
|
||||
|
@ -9,7 +9,7 @@ import com.ycwl.basic.pay.entity.RefundResponse;
|
||||
import com.ycwl.basic.pay.entity.RefundOrderRequest;
|
||||
import com.ycwl.basic.pay.entity.RefundOrderResponse;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -34,8 +34,8 @@ import com.ycwl.basic.pay.exceptions.PayWrongConfigException;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.util.Base64Utils;
|
||||
|
||||
import javax.servlet.ServletInputStream;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.ServletInputStream;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
|
@ -3,7 +3,7 @@ package com.ycwl.basic.service.mobile;
|
||||
import com.ycwl.basic.model.wx.WXPayOrderReqVO;
|
||||
import com.ycwl.basic.model.wx.WxchatCallbackSuccessData;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import java.io.IOException;
|
||||
import java.security.GeneralSecurityException;
|
||||
import java.util.Map;
|
||||
|
@ -32,7 +32,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import java.io.IOException;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
|
@ -11,8 +11,8 @@ import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/trace/v1")
|
||||
|
@ -11,8 +11,8 @@ import org.springframework.web.method.HandlerMethod;
|
||||
import org.springframework.web.servlet.HandlerInterceptor;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.util.Date;
|
||||
import java.util.HashSet;
|
||||
|
||||
|
@ -2,7 +2,7 @@ package com.ycwl.basic.utils;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
|
||||
|
@ -10,8 +10,8 @@ import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
|
||||
import javax.servlet.http.Cookie;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.Cookie;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
@ -25,12 +25,6 @@ spring:
|
||||
jackson:
|
||||
date-format: "yyyy-MM-dd HH:mm:ss"
|
||||
time-zone: GMT+8
|
||||
redis:
|
||||
host: 10.59.3.218
|
||||
port: 6379
|
||||
# 密码过于复杂需要使用''引起来,要不可能导致项目无法启动,因为无法识别特殊字符
|
||||
password: ZhEnTuAi
|
||||
timeout: 40000
|
||||
# 配置用户头像存放静态资源文件夹
|
||||
# 配置请求文件大小
|
||||
servlet:
|
||||
@ -40,6 +34,12 @@ spring:
|
||||
web:
|
||||
resources:
|
||||
static-locations: classpath:/META-INF/resources/,classpath:/resources/,classpath:/static/,classpath:/public/
|
||||
data:
|
||||
redis:
|
||||
host: 10.59.3.218
|
||||
port: 6379
|
||||
password: ZhEnTuAi
|
||||
timeout: 40000
|
||||
|
||||
# MyBatis
|
||||
mybatis-plus:
|
||||
|
@ -1,5 +1,5 @@
|
||||
server:
|
||||
port: 8030
|
||||
port: 8031
|
||||
|
||||
spring:
|
||||
application:
|
||||
@ -29,12 +29,6 @@ spring:
|
||||
jackson:
|
||||
date-format: "yyyy-MM-dd HH:mm:ss"
|
||||
time-zone: GMT+8
|
||||
redis:
|
||||
host: 127.0.0.1
|
||||
port: 6379
|
||||
# 密码过于复杂需要使用''引起来,要不可能导致项目无法启动,因为无法识别特殊字符
|
||||
password: ''
|
||||
timeout: 2000
|
||||
# 配置用户头像存放静态资源文件夹
|
||||
# 配置请求文件大小
|
||||
servlet:
|
||||
@ -44,6 +38,12 @@ spring:
|
||||
web:
|
||||
resources:
|
||||
static-locations: classpath:/META-INF/resources/,classpath:/resources/,classpath:/static/,classpath:/public/
|
||||
data:
|
||||
redis:
|
||||
host: 127.0.0.1
|
||||
port: 6379
|
||||
password: ''
|
||||
timeout: 5000
|
||||
|
||||
# MyBatis
|
||||
mybatis-plus:
|
||||
|
Reference in New Issue
Block a user