SpringBoot maven 多模块项目搭建
File -> New -> Project -> Spring Initializer->next
File -> New -Module -> Maven
可以直接在parent这个模块上,右键,new->module,这样创建的模块默认以这个parent为父模块,创建完之后如下:
pom文件内容如下:
<?xml version="1.0" encoding="UTF-8"?>xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 pom springboot-common springboot-core springboot-service springboot-web org.springframework.boot spring-boot-starter-parent 2.6.2 com.springboot.multimodule springboot-maven-multi 0.0.1-SNAPSHOT 1.8 org.springframework.boot spring-boot-starter org.springframework.boot spring-boot-starter-web org.projectlombok lombok true provided org.springframework.boot spring-boot-starter-test test org.springframework.boot spring-boot-maven-plugin