springboot 多模块项目创建
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 多模块项目创建的更多相关文章
- 使用IDEA构建Spring-boot多模块项目配置流程
使用IDEA构建Spring-boot多模块项目配置流程 1.创建项目 点击Create New Project 在左侧选中Spring Initializer,保持默认配置,点击下一步. 在Grou ...
- Maven入门,Maven项目的创建,nexus 2.x搭建私服以及Maven多模块项目创建
maven的了解做一个总结,以便日后查阅, 若有不足之处,还望指出,学无止境 当然也能起到入门效果. 一,搭建maven私服 1.工具 a. Nexus 2.5.1-01 b. Maven 3.3.9 ...
- SpringBoot多模块项目打包问题
项目结构图如下: 在SpringBoot多模块项目打包时遇见如下错误: 1.repackage failed: Unable to find main class -> [Help 1] 解决步 ...
- Spring Boot 多模块项目创建与配置 (一) (转)
Spring Boot 多模块项目创建与配置 (一) 最近在负责的是一个比较复杂项目,模块很多,代码中的二级模块就有9个,部分二级模块下面还分了多个模块.代码中的多模块是用maven管理的,每个模块都 ...
- Spring Boot 多模块项目创建与配置 (一)
最近在负责的是一个比较复杂项目,模块很多,代码中的二级模块就有9个,部分二级模块下面还分了多个模块.代码中的多模块是用maven管理的,每个模块都使用spring boot框架.之前有零零散散学过一些 ...
- 2017-09-26 发布 SpringBoot多模块项目实践(Multi-Module)
https://segmentfault.com/a/1190000011367492?utm_source=tag-newest 2017-09-26 发布 SpringBoot多模块项目实践(Mu ...
- Spring Boot 多模块项目创建与配置 (转)
转载:https://www.cnblogs.com/MaxElephant/p/8205234.html 最近在负责的是一个比较复杂项目,模块很多,代码中的二级模块就有9个,部分二级模块下面还分了多 ...
- 如何创建一个SpringBoot多模块项目
创建主模块rail-plate-line 1.点击Create New Project --> 选择Spring Initializr -- > 选择本地jdk 2.Group为com ...
- docker部署 springboot 多模块项目+vue
之前学习了docker,今天就来试试将这个项目打包成docker镜像并通过运行一个镜像来运行项目.这里使用的项目是el-admin.是一个开源的springboot后端管理框架(前端vue),有兴趣的 ...
随机推荐
- java后端开发面经 数据库相关
小姐姐:怎么理解感情中的付出和回报? 你答:有这样一个故事,讲的是一个小男孩和一个小女孩,这个小男孩呢,用很多好玩石头,而这个小女孩呢,有好多好吃的糖果,有一天,他们相互约定:小男孩用所有的石头交互小 ...
- NFS Debian 服务器,CentOS 客户端
0x00 事件 最近买了一台 500G 储存的 VPS,但是与国内的连接.下载速度都比较差,于是想了个「曲线救国」的方式. 另外有一台 GIA 与 VPS-500G 通信比较理想,同时 GIA 与国内 ...
- Linux 使用命令 1
fold : Usage: fold [OPTION]... [FILE]...Wrap input lines in each FILE (standard input by default), w ...
- [Spring cloud 一步步实现广告系统] 21. 系统错误汇总
广告系统学习过程中问题答疑 博客园 Eureka集群启动报错 Answer 因为Eureka在集群启动过程中,会连接集群中其他的机器进行数据同步,在这个过程中,如果别的服务还没有启动完成,就会出现Co ...
- python使用zabbix的API接口
一.实验环境 python3.6.6 zabbix 3.0.9 二.实验目的 了解Zabbix的API接口格式 通过python实现登陆zabbix服务,获得登陆token 通过python检索zab ...
- 《深入理解Java虚拟机》- JVM如何进行异常处理
一.Java异常 在程序中,错误可能产生于程序员没有预料到的各种情况,或者超出程序员可控范围的环境,例如用户的坏数据.试图打开一个不存在的文件等.为了能够及时有效地处理程序中的运行错误,Java 专门 ...
- Python 数据科学-Numpy
NumPy Numpy :提供了一个在Python中做科学计算的基础库,重在数值计算,主要用于多维数组(矩阵)处理的库.用来存储和处理大型矩阵,比Python自身的嵌套列表结构要高效的多.本身是由C语 ...
- Container及其内部进程监控剖析
目前市场上的虚拟化技术种类很多,例如moby(docker).LXC.RKT等等.在带来方便应用部署和资源充分利用的好处的同时,如何监控相应Container及其内部应用进程成为运维人员不可避免遇到的 ...
- RSA加密的java实现2(交互IOS)
这里的base64的依赖不一样,一个是apache,一个是sun的 ,由于base64的依赖不同,导致在IOS中解析不了! package com.handsight.platform.cipher ...
- 记录一则AIX使用裸设备安装OracleRAC的问题
需求背景:在AIX6.1上安装Oracle 10g RAC,一线工程师反馈节点2运行root脚本无法成功,跟进排查发现实际上底层存储磁盘的准备工作就存在问题. 客户要求底层存储选用裸设备方式,所以必须 ...