Spring-boot building Multi-module projects
Functional modules separate project development, can be a large project into a number of small projects, easy to subdivide the development
MAVEN Multi-module projects cannot exist independently and must have a medium to contain them.
1. Create a MAVEN project that can create a springboot project as a basic framework and need to introduce web support in Pom.xml.
2. Create a module in a media maven project, typically divided into three module:api/service/web
To create a module:
Project name right-click Ànewàmoduleàmaven
Artifactid Column Name The module is a subproject of the new MAVEN project above
Web projects need to be built into the Spring-boot project and the structure of other projects must be included under the package of the startup class, otherwise it cannot be scanned.
3.api sub-projects generally put a simple polo entity, service will place controller and business logic, Web layer placement page
4. Common jar files are placed under the parent Pom, and other sub-projects are not introduced again.
Spring-boot building Multi-module projects