Commit dbdc6995 by chentianzhong

2023年4月6日19:42:58

parent 72bcc9cf
...@@ -65,7 +65,7 @@ public class TokenFilter extends GenericFilterBean { ...@@ -65,7 +65,7 @@ public class TokenFilter extends GenericFilterBean {
// 对于 Token 为空的不需要去查 Redis // 对于 Token 为空的不需要去查 Redis
if (StrUtil.isNotBlank(token)) { if (StrUtil.isNotBlank(token)) {
OnlineUserDto onlineUserDto = adminFeignClient.getTokenUserInfo(); OnlineUserDto onlineUserDto = adminFeignClient.getTokenUserInfo();
AssertUtils.notNull(onlineUserDto, 500, "微服务异常,获取用户信息失败"); AssertUtils.notNull(onlineUserDto, 401, "微服务异常,当前登录用户失效");
if (onlineUserDto != null && StringUtils.hasText(token)) { if (onlineUserDto != null && StringUtils.hasText(token)) {
Authentication authentication = tokenProvider.getAuthentication(token); Authentication authentication = tokenProvider.getAuthentication(token);
SecurityContextHolder.getContext().setAuthentication(authentication); SecurityContextHolder.getContext().setAuthentication(authentication);
......
...@@ -10,7 +10,7 @@ spring: ...@@ -10,7 +10,7 @@ spring:
datasource: datasource:
druid: druid:
db-type: com.alibaba.druid.pool.DruidDataSource db-type: com.alibaba.druid.pool.DruidDataSource
url: jdbc:kingbase8://147.2.3.4:54321/EMAIL_NEW?ConfigurePath=/opt/db-config/EMAIL/jdbc_new.conf url: jdbc:kingbase8://147.2.3.4:54321/EMAIL_TEST?ConfigurePath=/opt/db-config/EMAIL/jdbc_new.conf
username: oa_system username: oa_system
password: GXfy/2014!@#$ password: GXfy/2014!@#$
driver-class-name: com.kingbase8.Driver driver-class-name: com.kingbase8.Driver
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment