• 一般情况下,推荐使用parent标签去继承
    1. <parent>
    2. <groupId>org.springframework.boot</groupId>
    3. <artifactId>spring-boot-starter-parent</artifactId>
    4. <version>1.4.2.RELEASE</version> <!--这里不能使用标签引用,必须写死,maven的bug?-->
    5. </parent>
    • 如果不想用继承的方法,可以使用import
    1. <dependencyManagement>
    2. <dependencies>
    3. <dependency>
    4. <groupId>org.springframework.boot</groupId>
    5. <artifactId>spring-boot-dependencies</artifactId>
    6. <version>${sprint.boot.version}</version>
    7. <type>pom</type>
    8. <scope>import</scope>
    9. </dependency>
    10. </dependencies>
    11. </dependencyManagement>