Spring

Spring bom(bill of materials)

2017-01-15  本文已影响259人  一路摇到顶
  1. 使用Spring bom 将可以自动管理第三发控件的版本号,从而避免由于版本的问题导致的各种各样的问题。
  2. 使用:在pom文件中添加
<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-framework-bom</artifactId>
            <version>4.3.5.RELEASE</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>
  1. 第三方控件
<dependencies>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-web</artifactId>
    </dependency>
<dependencies>

不需要指定版本号,pom会帮我们搞定。

上一篇 下一篇

猜你喜欢

热点阅读