SpringBoot不作为parent POM引入---自己或公司的项目已有parent POM

https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#using-boot-maven-without-a-parent


13.2.2 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 just prefer to explicitly declare all your Maven configuration.

If you don’t 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:


     
        
            
            org.springframework.boot
            spring-boot-dependencies
            1.5.9.RELEASE
            pom
            import
        
    

That setup does not allow you to override individual dependencies using a property as explained above. To achieve the same result, you’d need to add an entry in thedependencyManagement of your project before the spring-boot-dependencies entry. For instance, to upgrade to another Spring Data release train you’d add the following to your pom.xml.


    
        
        
            org.springframework.data
            spring-data-releasetrain
            Fowler-SR2
            import
            pom
        
        
            org.springframework.boot
            spring-boot-dependencies
            1.5.9.RELEASE
            pom
            import
        
    

In the example above, we specify a BOM but any dependency type can be overridden that way.



你可能感兴趣的:(SpringCloud)