码迷,mamicode.com
首页 > 编程语言 > 详细

Maven构建的Spring项目需要哪些依赖?

时间:2017-09-21 09:38:42      阅读:264      评论:0      收藏:0      [点我收藏+]

标签:pen   org   template   cti   工具   测试   code   enc   style   

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项目需要哪些依赖?

标签:pen   org   template   cti   工具   测试   code   enc   style   

原文地址:http://www.cnblogs.com/javafucker/p/7566733.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!