美文网首页Spring
Spring bom(bill of materials)

Spring bom(bill of materials)

作者: 一路摇到顶 | 来源:发表于2017-01-15 13:56 被阅读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会帮我们搞定。

    相关文章

      网友评论

        本文标题:Spring bom(bill of materials)

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