Scene description, using the Spring MVC framework for data preservation, using Firefox's firebug trace to find 404 Not Found.
Analysis: No error logs are printed in the background and the problem cannot be analyzed.
Solutions (provided by my friends)
Add a red section of the configuration file to the Spring-mvc.xml configuration file.
Add the Controlleradvicetest.java file under controller (note: must be under controller because Component-scan is configured in Spring-mvc.xml)
Run the background output the following error log again
It is clear that there is a problem with the object name and the problem is resolved. Attachment: Attach Controlleradvicetest.java Source code (Cannot add compressed package?) Please change the bag name yourself)
Package Com.snake.controller;import Org.apache.log4j.logger;import Org.springframework.http.httpstatus;import Org.springframework.web.bind.annotation.controlleradvice;import Org.springframework.web.bind.annotation.exceptionhandler;import Org.springframework.web.bind.annotation.responsestatus;import Org.springframework.web.context.request.NativeWebRequest; @ControllerAdvicepublic class Controlleradvicetest { protected static Logger Logger = Logger.getlogger (controlleradvicetest.class); @ExceptionHandler (Exception.class) @ResponseStatus (httpstatus.bad_request) public String Processunauthenticatedexception (Nativewebrequest request,exception e) { logger.error (e.getMessage ()); return "ViewName"; Returns a logical view name }}
Spring MVC 404 Not Found Error-free log solution