mirror of
https://github.com/continew-org/continew-starter.git
synced 2025-09-08 16:57:09 +08:00
style: 优化全局代码格式
This commit is contained in:
@@ -40,8 +40,7 @@ public class JustAuthStateCacheRedisImpl implements AuthStateCache {
|
||||
@Override
|
||||
public void cache(String key, String value) {
|
||||
// 参考:在 JustAuth 中,内置了一个基于 map 的 state 缓存器,默认缓存有效期为 3 分钟
|
||||
RedisUtils.set(RedisUtils.formatKey(KEY_PREFIX, key), value,
|
||||
Duration.ofMinutes(3));
|
||||
RedisUtils.set(RedisUtils.formatKey(KEY_PREFIX, key), value, Duration.ofMinutes(3));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -53,8 +52,7 @@ public class JustAuthStateCacheRedisImpl implements AuthStateCache {
|
||||
*/
|
||||
@Override
|
||||
public void cache(String key, String value, long timeout) {
|
||||
RedisUtils.set(RedisUtils.formatKey(KEY_PREFIX, key), value,
|
||||
Duration.ofMillis(timeout));
|
||||
RedisUtils.set(RedisUtils.formatKey(KEY_PREFIX, key), value, Duration.ofMillis(timeout));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -57,8 +57,9 @@ public class SaTokenAutoConfiguration implements WebMvcConfigurer {
|
||||
@Override
|
||||
public void addInterceptors(InterceptorRegistry registry) {
|
||||
// 注册 Sa-Token 拦截器,校验规则为 StpUtil.checkLogin() 登录校验
|
||||
registry.addInterceptor(new SaInterceptor(handle -> StpUtil.checkLogin())).addPathPatterns(StringConstants.PATH_PATTERN)
|
||||
.excludePathPatterns(properties.getSecurity().getExcludes());
|
||||
registry.addInterceptor(new SaInterceptor(handle -> StpUtil.checkLogin()))
|
||||
.addPathPatterns(StringConstants.PATH_PATTERN)
|
||||
.excludePathPatterns(properties.getSecurity().getExcludes());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -23,7 +23,6 @@ import org.springframework.boot.context.properties.NestedConfigurationProperty;
|
||||
import top.charles7c.continew.starter.auth.satoken.properties.SaTokenDaoProperties;
|
||||
import top.charles7c.continew.starter.auth.satoken.properties.SaTokenSecurityProperties;
|
||||
|
||||
|
||||
/**
|
||||
* SaToken 扩展配置属性
|
||||
*
|
||||
|
Reference in New Issue
Block a user