修改编译版本

This commit is contained in:
lulz1 2024-02-18 14:54:06 +08:00
parent 4e29974760
commit 5c4fa0b63a
2 changed files with 4 additions and 13 deletions

11
pom.xml
View File

@ -92,17 +92,6 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<image>
<builder>paketobuildpacks/builder-jammy-base:latest</builder>
</image>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>

View File

@ -2,6 +2,7 @@ package com.chint.infrastructure.webconfig;
import com.chint.domain.aggregates.user.User;
import com.chint.infrastructure.util.BaseContext;
import com.chint.infrastructure.util.Digest;
import com.chint.infrastructure.util.JWTUtil;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
@ -30,8 +31,9 @@ public class JwtTokenAdminInterceptor implements HandlerInterceptor {
}
try {
JWTUtil.verifyJWT(SECRET, token);
var parseJWT = JWTUtil.parseJWT(SECRET, token);
String str = Digest.aesBack(token);
JWTUtil.verifyJWT(SECRET, str);
var parseJWT = JWTUtil.parseJWT(SECRET, str);
var withJwt = User.withJwt(parseJWT);
BaseContext.setCurrentUser(withJwt);
return true; // If verification succeeds, continue processing the request