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

2、输入groupId  、artifactId

3、选择项目保存路劲  finish

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

5、创建子模块

6、

7、

8、成功创建子模块

9、依次创建多个子模块

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

11、根模块pom配置:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
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">
<modelVersion>4.0.0</modelVersion>
<properties>
<!--配置属性值-->
<java.version>1.8</java.version>
<version>1.0-SNAPSHOT</version><!--全局配置项目版本号-->
</properties>
<groupId>com.shu</groupId>
<artifactId>test01</artifactId>
<packaging>pom</packaging>
    <version>1.0-SNAPSHOT</version>
    <modules>
<module>code</module>
<module>user</module>
<module>order</module>
</modules>
<parent><!--根模块继承springboot 让所有的子模块都继承springboot-->
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.5.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<!--版本控制-->
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.shu</groupId>
<artifactId>code</artifactId>
<version>${version}</version>
</dependency>
<dependency>
<groupId>com.shu</groupId>
<artifactId>user</artifactId>
<version>${version}</version>
</dependency>
<dependency>
<groupId>com.shu</groupId>
<artifactId>order</artifactId>
<version>${version}</version>
</dependency>
</dependencies>
</dependencyManagement>
</project> 12、code子模块pom
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
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">
<parent>
<artifactId>test01</artifactId>
<groupId>com.shu</groupId>
       <version>1.0-SNAPSHOT</version>
    </parent>
<modelVersion>4.0.0</modelVersion> <artifactId>code</artifactId> </project> 13、user子模块pom
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
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">
<parent>
<artifactId>test01</artifactId>
<groupId>com.shu</groupId>
<version>1.0-SNAPSHOT</version>
    </parent>
<modelVersion>4.0.0</modelVersion> <artifactId>user</artifactId>
    <packaging>jar</packaging>
    <dependencies>
<!--添加对code模块的依赖-->
<dependency>
<groupId>com.shu</groupId>
<artifactId>code</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<!--引入springboot web支持-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
</dependencies> </project>
14、user模块调试

调用成功!

												

springboot 多模块项目创建的更多相关文章

  1. 使用IDEA构建Spring-boot多模块项目配置流程

    使用IDEA构建Spring-boot多模块项目配置流程 1.创建项目 点击Create New Project 在左侧选中Spring Initializer,保持默认配置,点击下一步. 在Grou ...

  2. Maven入门,Maven项目的创建,nexus 2.x搭建私服以及Maven多模块项目创建

    maven的了解做一个总结,以便日后查阅, 若有不足之处,还望指出,学无止境 当然也能起到入门效果. 一,搭建maven私服 1.工具 a. Nexus 2.5.1-01 b. Maven 3.3.9 ...

  3. SpringBoot多模块项目打包问题

    项目结构图如下: 在SpringBoot多模块项目打包时遇见如下错误: 1.repackage failed: Unable to find main class -> [Help 1] 解决步 ...

  4. Spring Boot 多模块项目创建与配置 (一) (转)

    Spring Boot 多模块项目创建与配置 (一) 最近在负责的是一个比较复杂项目,模块很多,代码中的二级模块就有9个,部分二级模块下面还分了多个模块.代码中的多模块是用maven管理的,每个模块都 ...

  5. Spring Boot 多模块项目创建与配置 (一)

    最近在负责的是一个比较复杂项目,模块很多,代码中的二级模块就有9个,部分二级模块下面还分了多个模块.代码中的多模块是用maven管理的,每个模块都使用spring boot框架.之前有零零散散学过一些 ...

  6. 2017-09-26 发布 SpringBoot多模块项目实践(Multi-Module)

    https://segmentfault.com/a/1190000011367492?utm_source=tag-newest 2017-09-26 发布 SpringBoot多模块项目实践(Mu ...

  7. Spring Boot 多模块项目创建与配置 (转)

    转载:https://www.cnblogs.com/MaxElephant/p/8205234.html 最近在负责的是一个比较复杂项目,模块很多,代码中的二级模块就有9个,部分二级模块下面还分了多 ...

  8. 如何创建一个SpringBoot多模块项目

    创建主模块rail-plate-line 1.点击Create New Project  --> 选择Spring Initializr  -- > 选择本地jdk 2.Group为com ...

  9. docker部署 springboot 多模块项目+vue

    之前学习了docker,今天就来试试将这个项目打包成docker镜像并通过运行一个镜像来运行项目.这里使用的项目是el-admin.是一个开源的springboot后端管理框架(前端vue),有兴趣的 ...

随机推荐

  1. (十二)c#Winform自定义控件-分页控件

    前提 入行已经7,8年了,一直想做一套漂亮点的自定义控件,于是就有了本系列文章. 开源地址:https://gitee.com/kwwwvagaa/net_winform_custom_control ...

  2. SQL语句完成Excel数据导入数据库表中流程方法及注意事项

    第一步:先查看数据库是否安装AccessDatabaseEngine_X64.exe, 如下图查看: 如果未安装先下载脚本之家下载地址 https://www.jb51.net/softs/29150 ...

  3. JMeter定制Sampler

    1.背景 相信大家在使用JMeter工具测试的时候,经常会遇到自带采样器无法满足测试要求的情况.面对这种情况,通常的办法是使用万能的自定义Java Request的达到测试目的.这个方法有个弊端,只要 ...

  4. html5 拖拽(drag)和f放置(drop)

    知识要点 HTML5 (drag&drop) API  (Event) 拖放数据(对象):DataTransfer 拖放内容:setData getData 拖放效果(动作):dropEffe ...

  5. 从SpringBoot构建十万博文聊聊高并发文章浏览量设计

    前言 在经历了,缓存.限流.布隆穿透等等一系列加强功能,十万博客基本算是成型,网站上线以后也加入了百度统计来见证十万+ 的整个过程. 但是百度统计并不能对每篇博文进行详细的浏览量统计,如果做一些热点博 ...

  6. 章节十六、1-TestNG简介

    一.TestNG 介绍 1.TestNG 是一个来自 JUnit 和 NUnit 的测试框架,它具拥有更多的功能,提高了 执行的效率. 2.TestNG 是一个开源的自动化测试框架 去除了老框架的大部 ...

  7. jar在linux上运行

    打jar后一直在linux远程的运行: nohup java -jar xxx.jar & CRT(打开时运行):(另外上传文件可使用“rz”命令,上传jar包) java -jar xxx. ...

  8. 装饰器修复技术@wraps

    @wrap修复技术 首先我先说一下wrap的效果 如果没使用@wraps,当A调用了装饰器B的话,即使A.name,返回的会是装饰器B的函数名称,而不是A的函数名称如果使用了@wraps,当A调用了装 ...

  9. 利用peerjs轻松玩转webrtc

    随着5G技术的推广,可以预见在不久的将来网速将得到极大提升,实时音视频互动这类对网络传输质量要求较高的应用将是最直接的受益者.而且伴随着webrtc技术的成熟,该领域可能将成为下一个技术热点,但是传统 ...

  10. Leetcode之深度优先搜索(DFS)专题-513. 找树左下角的值(Find Bottom Left Tree Value)

    Leetcode之深度优先搜索(DFS)专题-513. 找树左下角的值(Find Bottom Left Tree Value) 深度优先搜索的解题详细介绍,点击 给定一个二叉树,在树的最后一行找到最 ...