Background: Recently, the company is doing a scenic spot management system based on Springboot, the project will have all the functions to do a project, now the customer needs to put the front desk ticketing and background management deployed to two domain names, I am responsible for splitting the project, decided to use idea to create two project, The service and entity, DAO are divided into a common module, two projects are referenced, toss after the project can run but MAVEN packaging has been wrong;
And then I checked the data. This situation requires the use of MAVEN poly-Modular aggregation, that is, project is empty, the service is also module,module interdependence between the services is the jar package, the front desk service is the war package way;
Briefly describe the steps:
To create a MAVEN project:
Right-click the module for the new service in the project folder, because the Springboot project needs to select Spring
Create a module for the front desk ticketing service, pay attention to the package mode war, which is a service that needs to be deployed to Tomcat
Introducing module in Project's Pom file
Front Desk Ticket module relies on service module to configure dependencies in the Pom file
To package, to be packaged in a parent project:
Step on the pit.
All module base package names are the same, different will error, cannot find the class,
Delete the default startup class for non-serviced module