什么是spring-framework-bom和platform-b​​om之间的区别?

far*_*lmr 6 spring maven

我一直在试验Spring BOM并注意到有两个构建管理器 - spring-framework-bom和platform-b​​om

<dependencyManagement>
    <dependencies>
            <dependency> 
                <groupId>org.springframework</groupId> 
                <artifactId>spring-framework-bom</artifactId> 
                <version>${spring.version}</version> 
                <type>pom</type> 
                <scope>import</scope> 
            </dependency> 
        </dependencies> 
</dependencyManagement>
Run Code Online (Sandbox Code Playgroud)

要么

<dependencyManagement>
     <dependencies>
        <dependency>
            <groupId>io.spring.platform</groupId>
            <artifactId>platform-bom</artifactId>
            <version>1.1.2.RELEASE</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>
Run Code Online (Sandbox Code Playgroud)

有什么不同?或者春天框架被取代了?我个人更喜欢spring-framework-bom方法,因为我可以控制弹簧版本?

far*_*lmr 3

上周我在这个问题上进行了搜索,正如 M Deinum 所说,区别在于 spring-framework-bom 仅适用于框架。然后我提出了一个问题,如果使用platform-b​​om,我如何控制spring版本。

答案是检查 spring boot 依赖项目的 spring 版本 -

https://github.com/spring-projects/spring-boot/blob/master/spring-boot-dependency/pom.xml

版本摘要是 -

Spring 平台 BOM 版本 Spring 版本 1.1.2.RELEASE 4.2.0.RC1
1.1.0.RELEASE 4.1.3.RELEASE 1.0.0.RELEASE 4.0.5.RELEASE

参考 -

https://glenware.wordpress.com/2015/06/05/spring-bom-bill-of-materials/