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. 盘一盘 AQS和ReentrantLock

    AQS是个啥? AQS(AbstractQueuedSynchronizer)是Java并发用来构建锁和其他同步组件的基础框架.许多同步类实现都依赖于它,如常用的ReentrantLock/Reent ...

  2. Android老司机搬砖小技巧

    作为一名Android世界的搬运工,每天搬砖已经够苦够累了,走在坑坑洼洼的道路一不小心就掉坑里了. SDK常用工具类 Android SDK中本身就拥有很多轮子,熟悉这些轮子,可以提高我们的搬砖效率. ...

  3. Unity进阶:行为树 02 夺旗战搭建场景,AI脚本,旗子拿起

    版权申明: 本文原创首发于以下网站: 博客园『优梦创客』的空间:https://www.cnblogs.com/raymondking123 优梦创客的官方博客:https://91make.top ...

  4. 牛客网2016.4.11(两个数相加为sum/计数一个int型的二进制有多少个1/二叉树是否左右对称)

    求最小的两个数相加为sum //求最小的两个数相加为sum public ArrayList<Integer> FindNumbersWithSum(int [] array,int su ...

  5. Python之高阶函数如何理解?

    我们先要了解一下什么是所谓的高阶函数: 看定义:什么是高阶函数? 高阶函数:我们知道一个函数可以作为参数传给另外一个函数,或者一个函数的返回值为另外一个函数(若返回值为该函数本身,则为递归),如果满足 ...

  6. 深入浅出TypeScript(2)- 用TypeScript创建web项目

    前言 在第一篇中,我们简单介绍了TypeScript的一些简单语法,那么如果我们只是简单使用TypeScript开发一个web项目,应该做哪些准备?接下来我们就结合TypeScript和Webpack ...

  7. eruda.js 实现线上调出控制台

    <script src="//cdn.bootcss.com/eruda/1.3.0/eruda.min.js"></script> 调用 eruda.in ...

  8. Flac无损音频导入premiere

    安装Ogg Vorbis插件即可导入FLAC音频 项目地址:https://github.com/fnordware/AdobeOgg 下载地址:http://www.fnordware.com/do ...

  9. Spring框架之JdbcTemplate

    Spring框架之JdbcTemplate 一.JdbcTemplate简介 Spring对数据库的操作在jdbc上面做了深层次的封装,使用spring的注入功能,可以把DataSource注册到Jd ...

  10. 安装yarn集群

    安装yarn集群 # mapreduce运行平台YARN mapreduce程序应该是在很多机器上并行启动,而且先执行map task,当众多的maptask都处理完自己的数据 后,还需要启动众多的r ...