| | |
| | | package com.ruoyi.framework.config; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Qualifier; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.http.HttpMethod; |
| | |
| | | * 自定义用户认证逻辑 |
| | | */ |
| | | @Autowired |
| | | @Qualifier("UserDetailsServiceImpl") |
| | | private UserDetailsService userDetailsService; |
| | | |
| | | /** |
| | |
| | | DaoAuthenticationProvider daoAuthenticationProvider = new DaoAuthenticationProvider(); |
| | | daoAuthenticationProvider.setUserDetailsService(userDetailsService); |
| | | daoAuthenticationProvider.setPasswordEncoder(bCryptPasswordEncoder()); |
| | | |
| | | return new ProviderManager(daoAuthenticationProvider); |
| | | } |
| | | |