!24 【轻量级 PR】:PasswordEncoder 加密复杂度自定义
parent
b9ba17a477
commit
09afdaafcf
|
@ -37,4 +37,8 @@ public class SecurityProperties {
|
||||||
*/
|
*/
|
||||||
private List<String> permitAllUrls = Collections.emptyList();
|
private List<String> permitAllUrls = Collections.emptyList();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PasswordEncoder 加密复杂度,越高开销越大
|
||||||
|
*/
|
||||||
|
private Integer passwordEncoderLength = 4;
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,7 +69,7 @@ public class YudaoSecurityAutoConfiguration {
|
||||||
*/
|
*/
|
||||||
@Bean
|
@Bean
|
||||||
public PasswordEncoder passwordEncoder() {
|
public PasswordEncoder passwordEncoder() {
|
||||||
return new BCryptPasswordEncoder();
|
return new BCryptPasswordEncoder(securityProperties.getPasswordEncoderLength());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue