文章目录
springboot的多模块开发
springboot-high
|–springboot-common 模块 (DTO)
|–springboot-domain 模块 (entity)
|–springboot-service 模块 (业务模块)
|–springboot-web 模块 (页面模块)
1.创建项目springboot-high
父模块的不需要打包,设置内容为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>
<groupId>com.dyit.springboot</groupId>
<artifactId>springboot-high</artifactId>
<version>1.0-SNAPSHOT</version>
<modules>
<module>springboot-common</module>
<module>springboot-domain</module>
<module>springboot-service</module>
</modules>
<packaging>pom</packaging>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<project.lombok.version>1.18.22</project.lombok.version>
<project.maven.verison>3.1</project.maven.verison>
</properties>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.5.10</version>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${project.lombok.version}</version>
</dependency>
</dependencies>
<!--打包插件-->
<build>