idea环境下springboot项目父子多模块打包部署过程讲解

idea环境下springboot项目父子多模块打包部署过程讲解

我们以一个使用idea构建的项目为例为大家讲解如何对springboot的父子模1块工程进行打包部署;
1.项目工程结构
父工程:ewe-hr
子模块:core 不依赖其它模块
子模块:user依赖core
子模块:hr依赖user和core,并且hr模块是我们启动类application所在的模块
2.各个子模块的pom文件的配置情况
父工程:ewe-hr 的pom文件配置

<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>
	 <packaging>pom</packaging>
	 <!-- 项目说明:这里作为聚合工程的父工程 -->
	 <groupId>com.ewe</groupId>
	 <artifactId>ewe-hr</artifactId>
	 <version>1.0.0.RELEASE</version>
	 
	  <!-- 继承说明:这里继承SpringBoot提供的父工程 -->
	 <parent>
	    <groupId>org.springframework.boot</groupId>
	    <artifactId>spring-boot-starter-parent</artifactId>
	    <version>1.5.9.RELEASE</version>
	 </parent>
  	<properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>1.7</java.version>
    </properties>
	 <!-- 模块说明:这里声明多个子模块 -->
     <modules>
        <module>core</module>
        <module>hr</module>
        <module>user</module>
     </modules>
     <dependencyManagement>
      <!-- 模块说明:这里声明多个子模块 -->
	 	 <dependencies>
	 		<!-
评论 2
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值