父工程pom文件
子模块pom文件
子模块配置文件
然后项目跑不起来
有人懂吗?
【相关推荐】
1、一定要使用 <dependencyManagement></dependencyManagement>标签
2、其他正常配置:主要继承 spring-boot-starter-parent 即可
3、记得配置<packaging>pom</packaging>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.2.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.family</groupId>
<artifactId>springboot-family</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>springboot-family</name>
<description>Demo project for Spring Boot</description>
<packaging>pom</packaging>
<modules>
<module>spring-boot-thymeleaf</module>
</modules>
<properties>
<java.version>1.8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<!--打包跳过单元测试-->
<skipTests>true</skipTests>
<!--统一管理版本-->
<boot.version>2.2.2.RELEASE</boot.version>
<lombok.version>1.18.10</lombok.version>
</properties>
<!-- 父工程统一管理版本依赖,model需要引用当前parent的jar,只需配置groupId和artifactId即可-->
<!--这是最终的标签-->
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
<version>${boot.version}</version>
</dependency>
</dependencies>
</dependencyManagement>