How do I enable logging for Spring Security?

后端 未结 6 1484
孤独总比滥情好
孤独总比滥情好 2020-12-02 21:34

I am setting up Spring Security to handle logging users in. I have logged in as a user, and am taken to an Access Denied error page upon successful login. I don\'t know what

6条回答
  •  孤城傲影
    2020-12-02 22:20

    You can easily enable debugging support using an option for the @EnableWebSecurity annotation:

    @EnableWebSecurity(debug = true)
    public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
        …
    }
    

    If you need profile-specific control the in your application-{profile}.properties file

    org.springframework.security.config.annotation.web.builders.WebSecurity.debugEnabled=false
    

    Get Detailed Post: http://www.bytefold.com/enable-disable-profile-specific-spring-security-debug-flag/

提交回复
热议问题