0
点赞
收藏
分享

微信扫一扫

maven项目改成springboot项目

热爱生活的我一雷广琴 2022-03-30 阅读 66
java后端

方式一:

//指定pom文件的parent
<parent>
 <groupId>org.springframework.boot</groupId>
 <artifactId>spring-boot-starter-parent</artifactId>
 <version>2.1.1.RELEASE</version>
</parent>

方式二(适合多模块项目集中管理版本):

<dependencyManagement>
 <dependencies>
 <dependency>
 <groupId>org.springframework.boot</groupId>
 <artifactId>spring-boot-dependencies</artifactId>
 <version>2.1.1.RELEASE</version>
 <type>pom</type>
 <scope>import</scope>
 </dependency>
 </dependencies>
</dependencyManagement>

多模块项目中可以在父模块中用dependencyManagement声明依赖(并不实现引入),子模块通过引入父模块即可实现统一版本管理。

举报

相关推荐

0 条评论