BUGFIX: token过期,重新登录无法解决

This commit is contained in:
2026-02-02 14:57:32 +08:00
parent b23faeeee2
commit c160da5132
2 changed files with 5 additions and 3 deletions

View File

@@ -244,12 +244,13 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
AccountLoginVO response = CopyUtil.copyObject(account, AccountLoginVO.class);
response.setEmail(account.getUserEmail());
String token = LocalCacheUtils.getTokenCache(String.valueOf(account.getId()));
if (StringUtils.isNotBlank(token)) {
/*if (StringUtils.isNotBlank(token)) {
//用户已登入
response.setToken(token);
} else {
response.setToken(createAccountToken(account));
}
}*/
response.setToken(createAccountToken(account));
response.setUserId(account.getId());
response.setSystemUser(account.getSystemUser());
// 设置头像

View File

@@ -17,7 +17,8 @@ spring.security.jwtSecret=JWTSECRET
spring.security.jwtTokenHeader=Authorization
spring.security.jwtTokenPrefix=Bearer-
## 24Сʱ
spring.security.jwtExpiration=8640000000
#spring.security.jwtExpiration=8640000000
spring.security.jwtExpiration=60000
#spring security权限设置 认证了token还要认证权限 不然报错Full authentication is required to access this resource
spring.security.ignorePaths=/,/favicon.ico,/doc.html,/webjars/**,/swagger-resources,/v2/api-docs,\
/api/account/**,/api/element/**,/api/python/**,/api/design/**,/api/history/**,/api/library/**,/api/third/party/**,/api/generate/**,/api/workspace/**,/api/classification/**,\