1. 程式人生 > >Maven構建的Spring項目需要哪些依賴?

Maven構建的Spring項目需要哪些依賴?

con frame template mave 包括 依賴 工具 mvc release

Maven構建的Spring項目需要哪些依賴?

    <!-- Spring依賴 -->
    <!-- 1.Spring核心依賴 -->
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-core</artifactId>
        <version>4.3.7.RELEASE</version>
    </dependency>
    <
dependency> <groupId>org.springframework</groupId> <artifactId>spring-beans</artifactId> <version>4.3.7.RELEASE</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId
>spring-context</artifactId> <version>4.3.7.RELEASE</version> </dependency> <!-- 2.Spring dao依賴 --> <!-- spring-jdbc包括了一些如jdbcTemplate的工具類 --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-jdbc</
artifactId> <version>4.3.7.RELEASE</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-tx</artifactId> <version>4.3.7.RELEASE</version> </dependency> <!-- 3.Spring web依賴 --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-web</artifactId> <version>4.3.7.RELEASE</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> <version>4.3.7.RELEASE</version> </dependency> <!-- 4.Spring test依賴:方便做單元測試和集成測試 --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> <version>4.3.7.RELEASE</version>   </dependency>

一共四個方面:

1)spring核心依賴

spring-core、spring-beans、spring-context

2)spring dao依賴(提供JDBCTemplate)

spring-jdbc、spring-tx

3)spring web依賴

spring-web、spring-webmvc

4)spring test依賴

spring-test

Maven構建的Spring項目需要哪些依賴?