SPRING 在 pom.xml 中的使用技巧

经过Spring BOM,在 dependencyManagement 导入spring-framework-bom ,而后就能够保证全部的Spring依赖都是同一个版本     -- 能够不用再声明版本了。web

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-framework-bom</artifactId>
            <version>4.3.3.RELEASE</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

<dependencies>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-web</artifactId>
    </dependency>
<dependencies>
相关文章
相关标签/搜索