@ 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,