springboot 多模块项目创建

1、File>new>project  直接点击next

springboot 多模块项目创建_第1张图片

2、输入groupId  、artifactId

springboot 多模块项目创建_第2张图片

3、选择项目保存路劲  finish

springboot 多模块项目创建_第3张图片

4、成功创建多模块项目的根模块

springboot 多模块项目创建_第4张图片

5、创建子模块

springboot 多模块项目创建_第5张图片

6、

springboot 多模块项目创建_第6张图片

7、

springboot 多模块项目创建_第7张图片

8、成功创建子模块

springboot 多模块项目创建_第8张图片

9、依次创建多个子模块

10、删除根模块的无用文件夹

springboot 多模块项目创建_第9张图片

11、根模块pom配置:


xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0


1.8
1.0-SNAPSHOT

com.shu
test01
pom
    1.0-SNAPSHOT


code
user
order


org.springframework.boot
spring-boot-starter-parent
2.1.5.RELEASE






com.shu
code
${version}


com.shu
user
${version}


com.shu
order
${version}






12、code子模块pom

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

test01
com.shu
       1.0-SNAPSHOT


4.0.0

code




13、user子模块pom

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

test01
com.shu
1.0-SNAPSHOT
    
4.0.0

user
    jar




com.shu
code


org.springframework.boot
spring-boot-starter



org.springframework.boot
spring-boot-starter-web




14、user模块调试

springboot 多模块项目创建_第10张图片

springboot 多模块项目创建_第11张图片

springboot 多模块项目创建_第12张图片

调用成功!

 

 

 


 

你可能感兴趣的:(springboot 多模块项目创建)