升级到Spring Security 5之后,我开始在与防火墙相关的日志中看到很多异常。有没有办法在Spring Boot中处理这些异常(它无法与@ExceptionHandler
一起使用),以便我可以对这些异常进行一些分析,或者至少决定不使用这些大堆栈跟踪来阻塞日志文件?
org.springframework.security.web.firewall.RequestRejectedException: The request was rejected because the URL was not normalized.
at org.springframework.security.web.firewall.StrictHttpFirewall.getFirewalledRequest(StrictHttpFirewall.java:248)
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:193)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:347)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:263)
我正在使用Spring Boot 1.5.14
我什至找不到一种机制来关闭这些异常的日志记录。