refactor: 配置变量命名优化
This commit is contained in:
@@ -6,9 +6,9 @@ import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
|||||||
import org.springframework.security.crypto.password.PasswordEncoder;
|
import org.springframework.security.crypto.password.PasswordEncoder;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* 密码编码器
|
||||||
*
|
*
|
||||||
*
|
* @author Ray.Hao
|
||||||
* @author haoxr
|
|
||||||
* @since 2024/12/3
|
* @since 2024/12/3
|
||||||
*/
|
*/
|
||||||
@Configuration
|
@Configuration
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import com.youlai.boot.config.property.SecurityProperties;
|
|||||||
import com.youlai.boot.core.filter.RateLimiterFilter;
|
import com.youlai.boot.core.filter.RateLimiterFilter;
|
||||||
import com.youlai.boot.core.security.exception.MyAccessDeniedHandler;
|
import com.youlai.boot.core.security.exception.MyAccessDeniedHandler;
|
||||||
import com.youlai.boot.core.security.exception.MyAuthenticationEntryPoint;
|
import com.youlai.boot.core.security.exception.MyAuthenticationEntryPoint;
|
||||||
import com.youlai.boot.core.security.extension.WeChatAuthenticationProvider;
|
import com.youlai.boot.core.security.extension.WechatAuthenticationProvider;
|
||||||
import com.youlai.boot.core.security.filter.CaptchaValidationFilter;
|
import com.youlai.boot.core.security.filter.CaptchaValidationFilter;
|
||||||
import com.youlai.boot.core.security.filter.JwtValidationFilter;
|
import com.youlai.boot.core.security.filter.JwtValidationFilter;
|
||||||
import com.youlai.boot.core.security.service.SysUserDetailsService;
|
import com.youlai.boot.core.security.service.SysUserDetailsService;
|
||||||
@@ -138,8 +138,8 @@ public class SecurityConfig {
|
|||||||
* 微信认证 Provider
|
* 微信认证 Provider
|
||||||
*/
|
*/
|
||||||
@Bean
|
@Bean
|
||||||
public WeChatAuthenticationProvider weChatAuthenticationProvider() {
|
public WechatAuthenticationProvider weChatAuthenticationProvider() {
|
||||||
return new WeChatAuthenticationProvider(userService, wxMaService);
|
return new WechatAuthenticationProvider(userService, wxMaService);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -52,12 +52,12 @@ public class SecurityProperties {
|
|||||||
/**
|
/**
|
||||||
* 访问令牌有效期(单位:秒)
|
* 访问令牌有效期(单位:秒)
|
||||||
*/
|
*/
|
||||||
private Integer accessTokenExpiration;
|
private Integer accessTokenTimeToLive;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 刷新令牌有效期(单位:秒)
|
* 刷新令牌有效期(单位:秒)
|
||||||
*/
|
*/
|
||||||
private Integer refreshTokenExpiration;
|
private Integer refreshTokenTimeToLive;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,9 +82,9 @@ security:
|
|||||||
# JWT 秘钥
|
# JWT 秘钥
|
||||||
key: SecretKey012345678901234567890123456789012345678901234567890123456789
|
key: SecretKey012345678901234567890123456789012345678901234567890123456789
|
||||||
# 访问令牌 有效期(单位:秒),默认 1 小时
|
# 访问令牌 有效期(单位:秒),默认 1 小时
|
||||||
access-token-expiration: 3600
|
access-token-time-to-live: 3600
|
||||||
# 刷新令牌有效期(单位:秒),默认 7 天
|
# 刷新令牌有效期(单位:秒),默认 7 天
|
||||||
refresh-token-expiration: 604800
|
refresh-token-time-to-live: 604800
|
||||||
# 白名单列表
|
# 白名单列表
|
||||||
ignore-urls:
|
ignore-urls:
|
||||||
- /v3/api-docs/**
|
- /v3/api-docs/**
|
||||||
@@ -213,8 +213,8 @@ captcha:
|
|||||||
# 验证码有效期(秒)
|
# 验证码有效期(秒)
|
||||||
expire-seconds: 120
|
expire-seconds: 120
|
||||||
|
|
||||||
# 微信小程序
|
# 微信小程配置
|
||||||
wechat:
|
wx:
|
||||||
miniapp:
|
miniapp:
|
||||||
appId: xxxxxx
|
app-id: xxxxxx
|
||||||
appSecret: xxxxxx
|
app-secret: xxxxxx
|
||||||
@@ -81,9 +81,9 @@ security:
|
|||||||
# JWT 秘钥
|
# JWT 秘钥
|
||||||
key: SecretKey012345678901234567890123456789012345678901234567890123456789
|
key: SecretKey012345678901234567890123456789012345678901234567890123456789
|
||||||
# 访问令牌 有效期(单位:秒),默认 1 小时
|
# 访问令牌 有效期(单位:秒),默认 1 小时
|
||||||
access-token-expiration: 3600
|
access-token-time-to-live: 3600
|
||||||
# 刷新令牌有效期(单位:秒),默认 7 天
|
# 刷新令牌有效期(单位:秒),默认 7 天
|
||||||
refresh-token-expiration: 604800
|
refresh-token-time-to-live: 604800
|
||||||
# 白名单列表
|
# 白名单列表
|
||||||
ignore-urls:
|
ignore-urls:
|
||||||
- /v3/api-docs/**
|
- /v3/api-docs/**
|
||||||
@@ -212,8 +212,8 @@ captcha:
|
|||||||
# 验证码有效期(秒)
|
# 验证码有效期(秒)
|
||||||
expire-seconds: 120
|
expire-seconds: 120
|
||||||
|
|
||||||
# 微信小程序
|
# 微信小程配置
|
||||||
wechat:
|
wx:
|
||||||
miniapp:
|
miniapp:
|
||||||
appId: xxxxxx
|
app-id: xxxxxx
|
||||||
appSecret: xxxxxx
|
app-secret: xxxxxx
|
||||||
Reference in New Issue
Block a user