SpringMVC only intercepts the mapping path, but not the non-mapping path, how to intercept the non-mapping path?

I want to make a 404 page. If users type messy URL, they will jump to 404, but Springmvc will not intercept paths without mapping, and then jump directly to Tomcat 404, but it is impossible for users to see Tomcat 404. So is there any good solution


students, take a look at Spring document . Basically, there are official solutions. If it is really difficult for English, right click to translate into Chinese

.

you can also use SimpleMappingExceptionResolver to capture NoHandlerFoundException try


spring,web.xml,listener,interceptor can handle

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e439d8-441d7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e439d8-441d7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?