public class SecurityConfig extends AbstractSecurityConfig
核心的spring security配置
此配置为示例配置,在使用的项目中,需要进入如下配置
并在类接口上配置 注解@EnableWebSecurity开启spring social时,需要先注入SpringSocialConfigurer
@Autowired(required = false) private SpringSocialConfigurer socialSecurityConfig;接着在 configure 方法中加入以下配置
http.apply(socialSecurityConfig);
authenticationProvider, securityContextManager
Constructor and Description |
---|
SecurityConfig() |
Modifier and Type | Method and Description |
---|---|
protected void |
configure(org.springframework.security.config.annotation.web.builders.HttpSecurity http) |
authenticationManagerBean, configure, getSecurityContextManager, globalUserDetails, setSecurityContextManager
authenticationManager, configure, getApplicationContext, getHttp, init, setApplicationContext, setAuthenticationConfiguration, setContentNegotationStrategy, setObjectPostProcessor, setTrustResolver, userDetailsService, userDetailsServiceBean
protected void configure(org.springframework.security.config.annotation.web.builders.HttpSecurity http) throws Exception
configure
in class AbstractSecurityConfig
Exception
Copyright © 2021. All rights reserved.