Recently, when I was working on SSM project (enterprise rights management system) and using Tomcat to deploy Maven’s collection project, I encountered some problems.
The reason is that the service class cannot be found and cannot be created. As a result, the service attribute cannot be injected into the controller and the initialization of the controller fails.
Before I did Maven aggregation project, I used Maven plug-in to deploy, and deployed directly using Tomcat.
Let’s first analyze Maven’s polymerization engineering.
The detailed Maven aggregation project is created and deployed:https://www.cnblogs.com/limn/…
Maven polymerization Engineering:
1. The packaging method of the parent project must be POM
2. Inheritance
The dependency introduced in the parent project POM can be used in the child project.
3. The relationship between aggregation and inheritance in Maven
Analysis of the construction of web applications
1. The packaging method of parent project is POM
2. The packaging method of Web project is war
3. The packaging method of other projects is jar