HOWTO handle 404 exceptions globally using Spring MVC configured using Java based Annotations

后端 未结 5 1915
眼角桃花
眼角桃花 2021-01-02 03:05

I am building a Spring 4 MVC app. And it is completely configured using Java Annotations. There is no web.xml. The app is configured by using instance of

5条回答
  •  情深已故
    2021-01-02 03:43

    Enable DispatcherServlet throw a NoHandlerFoundException through web.xml configuartion.

    
        throwExceptionIfNoHandlerFound
        true
    
    

提交回复
热议问题