Cause of the problem:
When I used MAVEN to build a Web project, I was not distributed, I put Pojo, DAO, service, web four layer directly in a parent project, and not one of the sub-engineering distinction, but directly packaged into a war package
So in the construction process there is no spring mapping file found, Web. xml file Error,
After I Baidu a bit found this configuration, by re-execution of the project, on the implementation of success
Add the following code to the project's Pom file
<!--If you do not add this node, the MyBatis mapper.xml file will be omitted. - <Build> <Resources> <!--If you do not add this node, the MyBatis mapper.xml file will be omitted. - <Resource> <Directory>Src/main/java</Directory> <includes> <include>**/*.properties</include> <include>**/*.xml</include> </includes> <filtering>False</filtering> </Resource> <Resource> <Directory>Src/main/resources</Directory> <includes> <include>**/*.properties</include> <include>**/*.xml</include> </includes> <filtering>False</filtering> </Resource> </Resources> <!--Add a Tomcat plugin - <Plugins> <plugin> <groupId>Org.apache.tomcat.maven</groupId> <Artifactid>Tomcat7-maven-plugin</Artifactid> <Configuration> <Port>8081</Port> <Path>/</Path> </Configuration> </plugin> </Plugins> </Build>
MAVEN builds Spring Framework report Applicationcontext-*.xml file not found