@Configuration
@EnableWebSecurity
public class SecurityConfig
extends org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
| Constructor and Description |
|---|
SecurityConfig() |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.security.authentication.AuthenticationManager |
authenticationManagerBean()
注册用户身份鉴定管理类,需要和基于token的验证区分开阿里,否则oauth2不能支持password(用户密码)鉴权模式
|
void |
configure(org.springframework.security.config.annotation.web.builders.HttpSecurity http)
访问策略
|
@Bean
public org.springframework.security.authentication.AuthenticationManager authenticationManagerBean()
throws java.lang.Exception
authenticationManagerBean in class org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapterjava.lang.Exceptionpublic void configure(org.springframework.security.config.annotation.web.builders.HttpSecurity http)
throws java.lang.Exception
configure in class org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapterjava.lang.Exception