Add NoHandlerFoundException to DispatcherServlet
Prior to this commit, the DispatcherServlet would send an error response using the HttpServlet API when no Handler was found to handle this request. Now the DispatcherServlet can be configured to throw a NoHandlerFoundException, when the throwExceptionIfNoHandlerFound property is set to "true". Those exceptions can be later on caught by default or custom HandlerExceptionResolvers/ExceptionHandlers. Issue: SPR-10481
This commit is contained in:
committed by
Rossen Stoyanchev
parent
4ef490621f
commit
62d6a43c61
@@ -4244,6 +4244,12 @@ public class SimpleController {
|
||||
<entry>400 (Bad Request)</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><classname>NoHandlerFoundException</classname></entry>
|
||||
|
||||
<entry>404 (Not Found)</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><classname>NoSuchRequestHandlingMethodException</classname></entry>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user