!24 【轻量级 PR】:PasswordEncoder 加密复杂度自定义

pull/2/head
YunaiV 2023-04-02 19:12:32 +08:00
parent b9ba17a477
commit 09afdaafcf
2 changed files with 5 additions and 1 deletions

View File

@ -37,4 +37,8 @@ public class SecurityProperties {
*/
private List<String> permitAllUrls = Collections.emptyList();
/**
* PasswordEncoder
*/
private Integer passwordEncoderLength = 4;
}

View File

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