update ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java.
Signed-off-by: Dftre <3066417822@qq.com>
This commit is contained in:
parent
1a17dd3e5d
commit
0d9b7f8086
@ -66,14 +66,13 @@ public class SecurityConfig {
|
||||
private PermitAllUrlProperties permitAllUrl;
|
||||
|
||||
/**
|
||||
* 解决 无法直接注入 AuthenticationManager
|
||||
*
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@Bean
|
||||
AuthenticationManager authenticationManager() {
|
||||
DaoAuthenticationProvider daoAuthenticationProvider = new DaoAuthenticationProvider();
|
||||
// 身份认证接口
|
||||
daoAuthenticationProvider.setUserDetailsService(userDetailsService);
|
||||
daoAuthenticationProvider.setPasswordEncoder(bCryptPasswordEncoder());
|
||||
return new ProviderManager(daoAuthenticationProvider);
|
||||
@ -138,13 +137,4 @@ public class SecurityConfig {
|
||||
public BCryptPasswordEncoder bCryptPasswordEncoder() {
|
||||
return new BCryptPasswordEncoder();
|
||||
}
|
||||
|
||||
/**
|
||||
* 身份认证接口
|
||||
*/
|
||||
// @Override
|
||||
// protected void configure(AuthenticationManagerBuilder auth) throws Exception
|
||||
// {
|
||||
// auth.userDetailsService(userDetailsService).passwordEncoder(bCryptPasswordEncoder());
|
||||
// }
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user