How does spring MVC handle requests that have not been controller for 404?

1, for example, there is a HelloController, processing http://localhost:8080/hello. Return to hello.jsp.

clipboard.png

2http://localhost:8080/helloWorld,controller404.jsp500

clipboard.png

Feb.28,2021
There are two types of

. If it is spring web directly, it can be specified in web.xml. If spring boot, needs to be implemented using java config, refer to the following blog post:
http://cxytiandi.com/blog/det.


problem solved. It is my contextConfigLocation configuration error.
comment out the following paragraph and ok it.
< mvc:default-servlet-handler default-servlet-name= "HelloWeb" / >

Menu