!24 PasswordEncoder 加密复杂度自定义

Merge pull request !24 from Fanjc/N/A
pull/20/MERGE
芋道源码 2023-04-02 11:08:19 +00:00 committed by Gitee
commit c0fa6311ce
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 7 additions and 1 deletions

View File

@ -32,6 +32,12 @@ public class SecurityProperties {
@NotEmpty(message = "mock 模式的密钥不能为空") // 这里设置了一个默认值,因为实际上只有 mockEnable 为 true 时才需要配置。 @NotEmpty(message = "mock 模式的密钥不能为空") // 这里设置了一个默认值,因为实际上只有 mockEnable 为 true 时才需要配置。
private String mockSecret = "test"; private String mockSecret = "test";
/**
* PasswordEncoder
*/
private Integer passwordEncoderLength =4;
/** /**
* URL * URL
*/ */

View File

@ -69,7 +69,7 @@ public class YudaoSecurityAutoConfiguration {
*/ */
@Bean @Bean
public PasswordEncoder passwordEncoder() { public PasswordEncoder passwordEncoder() {
return new BCryptPasswordEncoder(); return new BCryptPasswordEncoder(securityProperties.getPasswordEncoderLength());
} }
/** /**