spring-boot通过maven的依赖管理为我们写好了很多依赖项及其版本,我们可拿来使用。spring-boot文档介绍了两种使用方法,一是继承,二是导入。
通过<parent>继承:
1
2
3
4
5
6
7
|
<
project
>
<
parent
>
<
groupId
>org.springframework.boot</
groupId
>
<
artifactId
>spring-boot-starter-parent</
artifactId
>
<
version
>1.1.9.RELEASE</
version
>
</
parent
>
</
project
>
|
或者在<dependencyManagement>中导入:
1
2
3
4
5
6
7
8
9
10
11
|
<
dependencyManagement
>
<
dependencies
>
<
dependency
>
<
|