Home > Back-end >  Custom AbstractSecurityInterceptor after this class, all the URL will be filtered into, in the judge
Custom AbstractSecurityInterceptor after this class, all the URL will be filtered into, in the judge

Time:10-13

Configure Spring Security recently, following the blog demo learning, but the custom AbstractSecurityInterceptor after this class, all URL will be filtered into, in the judgement, even if a web configuration. Ignoring () or antMatchers () permitAll () didn't effect, is there a way to solve this problem?
 
@ Override
Protected void the configure (HTTP) HttpSecurity throws the Exception {
//super. The configure (HTTP);
HTTP
AuthorizeRequests ()
AntMatchers ("/", "/test1", "/test2", "/login", "/register/* *", "/webjars/* *"). The permitAll ()
AnyRequest (). Authenticated ()
And ()
FormLogin ()
LoginPage ("/login ")
PermitAll ()
//failureUrl (" login? Error=true ")
SuccessHandler (new MySuccessHandler ())
. DefaultSuccessUrl ("/admin/index ")
And ()
The logout ()
. LogoutSuccessUrl ("/")
And ()
//. CSRF (). The disable ()
RememberMe ()
;

HTTP. AddFilterAfter (myFilterSecurityInterceptor, FilterSecurityInterceptor. Class);
}



CodePudding user response:

Do you want according to the request to address user permissions, if so, you need to set up decision managers, and security source data,
  • Related