The error I reported here is:
14:02:15, 736 warn [pagenotfound] No mapping found for HTTP request with Uri [/spring3mvc/ABC/index. Do] In dispatcherservlet with name 'spring3mvc'
[Spring3mvc/ABC/index. Do] is the path of my request. For my current project, the path of my request is:
Http: // localhost: 8080/spring3mvc/ABC/index. Do
Spring3mvc is my project name, ABC is used for Action annotation, and index is the method annotation.
@Controller@RequestMapping("/abc")public class ZhujieRequestController { protected final transient Log log = LogFactory.getLog(ZhujieRequestController.class); @RequestMapping("/index") public String index() { return "hello"; }}
Other configuration files, such as web. xml and some JDBC connections I will not say, it is said that the core XML file: spring3MVC-servlet.xml
<? XML version = "1.0" encoding = "UTF-8"?> <Beans xmlns = "http://www.springframework.org/schema/beans" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xmlns: Tx = "http://www.springframework.org/schema/tx" xmlns: context = "http://www.springframework.org/schema/context" xmlns: MVC = "http://www.springframework.org/schema/mvc" xsi: schemalocation = "http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1. Xsdhttp: // your http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd "> <! -- Automatically scans the package name --> <context: component-scan base-package = "com. ideawu"/> <! -- Support for default annotation ing --> <! -- <MVC: annotation-driven/> --> <! -- View interpretation class --> <bean id = "viewresolver" class = "org. springframework. web. servlet. view. internalresourceviewresolver "> <property name =" prefix "value ="/"/> <property name =" suffix "value = ". JSP "/> <! -- Can be empty to facilitate the selection of view interpretation class Logic Based on the extension --> <property name = "viewclass" value = "org. springframework. web. servlet. view. jstlview "/> </bean> <! -- Request the method in action through annotation --> <bean id = "annotationhandlermapping" class = "org. springframework. web. servlet. MVC. annotation. defaultannotationhandlermapping "> <property name =" order "value =" 0 "/> <property name =" usedefasusuffixpattern "value =" false "/> <! -- Note that value = "false" is false. I got two o'clock P.M. from a.m. --> </bean> <beanclass = "org. springframework. web. servlet. MVC. annotation. annotationmethodhandleradapter "/> </beans>
This is the basic configuration. the restart of the service is changeable, and it will never work.
<property name="useDefaultSuffixPattern" value="false" />
To true. Ah, I just learned this problem. Good luck.