Spring MVC Spring Security and Error Handling

前端 未结 2 1979
孤独总比滥情好
孤独总比滥情好 2020-12-03 05:26

I\'m using ResponseEntityExceptionHandler for global handling the error and almost working normal, except I want to handle wrong request with spring. By any

2条回答
  •  庸人自扰
    2020-12-03 06:01

    throwExceptionIfNoHandlerFound take into account only if no handlers for request found.

    In case of default-servlet-handler was configured, DefaultServletHttpRequestHandler will handle request. So, if this solution doesn't work, remove it and have a look (debug) this place of DispatcherServlet.

提交回复
热议问题