美文网首页
代替spring-boot-starter-parent

代替spring-boot-starter-parent

作者: 皮皮鸡很皮 | 来源:发表于2018-12-18 15:10 被阅读0次
Using Spring Boot without the Parent POM

Not everyone likes inheriting from the spring-boot-starter-parent POM. You may have your own corporate standard parent that you need to use or you may prefer to explicitly declare all your Maven configuration.

If you do not want to use the spring-boot-starter-parent, you can still keep the benefit of the dependency management (but not the plugin management) by using a scope=import dependency, as follows:

<dependencyManagement>
        <dependencies>
        <dependency>
            <!-- Import dependency management from Spring Boot -->
            <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>

查看链接 spring 官网

相关文章

网友评论

      本文标题:代替spring-boot-starter-parent

      本文链接:https://www.haomeiwen.com/subject/ovklkqtx.html