From bca87e7b0d243f70b75c55dd2344460199c5a8bb Mon Sep 17 00:00:00 2001 From: wangjianhong <546732225seven@gmail.com> Date: Fri, 25 Jul 2025 09:25:32 +0800 Subject: [PATCH] no message --- .../filter/JwtRequestFilter.java | 7 ++-- src/main/resources/application.yml | 34 +++++++++---------- 2 files changed, 19 insertions(+), 22 deletions(-) diff --git a/src/main/java/com/arrokoth/standalone/authorization/filter/JwtRequestFilter.java b/src/main/java/com/arrokoth/standalone/authorization/filter/JwtRequestFilter.java index 0a1ebc1..06696bc 100644 --- a/src/main/java/com/arrokoth/standalone/authorization/filter/JwtRequestFilter.java +++ b/src/main/java/com/arrokoth/standalone/authorization/filter/JwtRequestFilter.java @@ -28,7 +28,7 @@ public class JwtRequestFilter extends OncePerRequestFilter { private final RedisTokenService redisTokenService; @Override - protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain chain)throws ServletException, IOException { + protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws ServletException, IOException { logRequestDetails(request); @@ -62,7 +62,6 @@ public class JwtRequestFilter extends OncePerRequestFilter { } - private String extractJwtFromRequest(HttpServletRequest request) { String jwt = null; @@ -85,8 +84,7 @@ public class JwtRequestFilter extends OncePerRequestFilter { try { return JwtUtils.extractUsername(jwt); } catch (Exception e) { - logger.warn("Failed to extract username from token", e); - throw new RuntimeException("Failed to extract username from token"); + throw new RuntimeException(e.getMessage()); } } @@ -117,7 +115,6 @@ public class JwtRequestFilter extends OncePerRequestFilter { } - /** * 封装的打印请求详情方法 */ diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index e7ded75..9805174 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -45,7 +45,7 @@ spring: name: authorization-server-standalone data: redis: - host: localhost + host: 127.0.0.1 port: 6379 password: yyds@8848 lettuce: @@ -62,20 +62,20 @@ logging: root: INFO com.arrokoth: DEBUG org.springdoc: INFO - org.springframework: DEBUG + org.springframework: INFO -#mybatis: -# type-aliases-package: com.arrokoth.**.domain -# mapper-locations: classpath*:com.arrokoth/**/mapper/xml/*.xml -# configuration: -# map-underscore-to-camel-case: true -# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl -#mybatis-plus: -# type-aliases-package: com.arrokoth.**.domain -# mapper-locations: classpath*:com.arrokoth/**/mapper/xml/*.xml -# global-config: -# banner: true -# enable-sql-runner: true -# configuration: -# map-underscore-to-camel-case: true -# check-config-location: true \ No newline at end of file +mybatis: + type-aliases-package: com.arrokoth.**.domain + mapper-locations: classpath*:com.arrokoth/**/mapper/xml/*.xml + configuration: + map-underscore-to-camel-case: true + log-impl: org.apache.ibatis.logging.stdout.StdOutImpl +mybatis-plus: + type-aliases-package: com.arrokoth.**.domain + mapper-locations: classpath*:com.arrokoth/**/mapper/xml/*.xml + global-config: + banner: true + enable-sql-runner: true + configuration: + map-underscore-to-camel-case: true + check-config-location: true \ No newline at end of file