Update 13.1.2. Using Spring Boot without the parent POM.md
parent
869e24fdc6
commit
876d338db2
|
@ -0,0 +1,19 @@
|
||||||
|
### 13.1.2. 使用没有父POM的Spring Boot
|
||||||
|
|
||||||
|
不是每个人都喜欢继承`spring-boot-starter-parent` POM。你可能需要使用公司标准parent,或你可能倾向于显式声明所有Maven配置。
|
||||||
|
|
||||||
|
如果你不使用`spring-boot-starter-parent`,通过使用一个`scope=import`的依赖,你仍能获取到依赖管理的好处:
|
||||||
|
```xml
|
||||||
|
<dependencyManagement>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<!-- Import dependency management from Spring Boot -->
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-dependencies</artifactId>
|
||||||
|
<version>1.3.0.BUILD-SNAPSHOT</version>
|
||||||
|
<type>pom</type>
|
||||||
|
<scope>import</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</dependencyManagement>
|
||||||
|
```
|
Loading…
Reference in New Issue