Merge branch 'master' of https://gitee.com/geek-xd/ruoyi-spring-boot3-geek
This commit is contained in:
commit
b2843fabff
@ -67,14 +67,13 @@ public class SecurityConfig {
|
|||||||
private PermitAllUrlProperties permitAllUrl;
|
private PermitAllUrlProperties permitAllUrl;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 解决 无法直接注入 AuthenticationManager
|
|
||||||
*
|
|
||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@Bean
|
@Bean
|
||||||
AuthenticationManager authenticationManager() {
|
AuthenticationManager authenticationManager() {
|
||||||
DaoAuthenticationProvider daoAuthenticationProvider = new DaoAuthenticationProvider();
|
DaoAuthenticationProvider daoAuthenticationProvider = new DaoAuthenticationProvider();
|
||||||
|
// 身份认证接口
|
||||||
daoAuthenticationProvider.setUserDetailsService(userDetailsService);
|
daoAuthenticationProvider.setUserDetailsService(userDetailsService);
|
||||||
daoAuthenticationProvider.setPasswordEncoder(bCryptPasswordEncoder());
|
daoAuthenticationProvider.setPasswordEncoder(bCryptPasswordEncoder());
|
||||||
return new ProviderManager(daoAuthenticationProvider);
|
return new ProviderManager(daoAuthenticationProvider);
|
||||||
@ -139,13 +138,4 @@ public class SecurityConfig {
|
|||||||
public BCryptPasswordEncoder bCryptPasswordEncoder() {
|
public BCryptPasswordEncoder bCryptPasswordEncoder() {
|
||||||
return new 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