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>
相關文章
相關標籤/搜索