Custom AccessDeniedHandler: How to control the logging of AccessDeniedException

馋奶兔 提交于 2020-01-07 02:42:12

问题


I have written a custom AccessDeniedHandler (look at this answer) and it works fine . But I wonder, why the AccessDeniedException is still logged in the background:

org.springframework.security.access.AccessDeniedException: Zugriff verweigert
    at org.springframework.security.access.vote.AffirmativeBased.decide(AffirmativeBased.java:84)
    at org.springframework.security.access.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:233)

How to suppress this logging? Or better: How can I control, when to log this message and when not?

来源:https://stackoverflow.com/questions/41678056/custom-accessdeniedhandler-how-to-control-the-logging-of-accessdeniedexception

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!