How do I enable logging for Spring Security?

后端 未结 6 1483
孤独总比滥情好
孤独总比滥情好 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:27

    Assuming you're using Spring Boot, another option is to put the following in your application.properties:

    logging.level.org.springframework.security=DEBUG
    

    This is the same for most other Spring modules as well.

    If you're not using Spring Boot, try setting the property in your logging configuration, e.g. logback.

    Here is the application.yml version as well:

    logging:
      level:
        org:
          springframework:
            security: DEBUG
    

提交回复
热议问题