With the completion of the project framework, I thought the launch would be successful, but ....
Project Start report Error 1:java.lang.classnotfoundexception:org.springframework.web.context.contextloaderlistener
This mistake Baidu to say is missing this package, but actually in the project see Maven inside there is this package. So continue Baidu to "may package is found, but not dependent on the project"
Project Right-click-----Project-----Deployment assembly, add, Java Build path entries, Maven Dependencies. Add him in.
"This allows MAVEN's jar packages to be put together on the server at the time of release.": The original text is as follows
The problem is solved. Scenario: Project Right-click, deployment assembly, add, Java Build path entries, Maven Dependencies. This allows the Maven jar package to be placed in the server with the release.
Thanks for sharing, I have also encountered this problem, my side of the situation is: After adding the Spring MVC jar package with Maven, the project is not referenced to these jars, the problem has two places: 1. Project name right-click-MAVEN does not operate update project; 2. Project name right-click Properties-Deployment Assembly, the right box does not operate as follows: Add, Java Build Path Entries, Next, select M Aven Dependencies, after the above operation is still a little problem, although the spring jar is referenced in the project, but the code can not reference the class library, so the operation is as follows: 1. Project name right-click Maven-Disable maven Nature; 2. The project name is right-click Configure, Convert to Maven project; 3. Finally, you need to check again the top describes the two problems where there is a recurrence, if so, repeat the steps;
Records-Some problems with Project Java Project Framework (Maven+spring+springmvc+mybatis)