为什么在Spring Security中弃用了
如果我删除
@EnableOAuth2Sso
?
这是我使用OAuth2的唯一原因。如果我删除
@EnableOAuth2Sso
,那么它就不会起作用。@Configuration
@EnableOAuth2Client
@EnableOAuth2Sso <- Need to have this!
public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
http
.csrf().disable()
.authorizeRequests()
.antMatchers("/Intranet/Bokning").authenticated()
.antMatchers("/**", "/Intranet**").permitAll()
.anyRequest().authenticated()
.and().logout().logoutSuccessUrl("/").permitAll();
}
}
还有其他解决方案吗?