mirror of
				https://gitee.com/hhyykk/ipms-sjy.git
				synced 2025-10-31 18:28:43 +08:00 
			
		
		
		
	!24 【轻量级 PR】:PasswordEncoder 加密复杂度自定义
This commit is contained in:
		| @@ -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()); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 YunaiV
					YunaiV