Spring Security - Access is denied (user is not anonymous) spring-security-core-4.0.3.RELEASE

前端 未结 5 858
暗喜
暗喜 2020-12-15 06:58

can anyone see an failure in this Spring Security Config File?

After Login the i get a debug message:

Access is denied (user is not anonymous)

5条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-15 07:29

    Just setting this URL as ignored by security ?

    @Configuration
    @EnableWebSecurity
    public class SecurityConfig extends WebSecurityConfigurerAdapter {
    
        @Override
        public void configure(WebSecurity web) throws Exception {
    
        web.ignoring().antMatchers("/layouts/**", "/styles/**", "/spring/login");
        }
        ...
    

提交回复
热议问题