spring内部各模块jar包依赖

对于spring内部各模块的jar包依赖关系可以通过eclipse的maven插件的dependency hierarchy视图进行形象地查看。下图就列举了3.0.5版本一些重要jar包之间的依赖关系:

上一篇文章提到的关于同一框架多jar包配置的最佳实践中提到,如果工程中使用到了多个spring的jar包,最好全部声明出来,不要试图通过spring内部的包依赖关系自动解析,而在pom中省去一些包的依赖声明,这有可能会导致其他包的版本变得不确定。以下是从spring官网上摘录的一份spring全配置参照:

[html]  view plain copy
  1. <!-- Shared version number properties -->  
  2. <properties>  
  3.     <org.springframework.version>3.0.5.RELEASE</org.springframework.version>  
  4. </properties>  
  5.   
  6. <!--  
  7.     Core utilities used by other modules.  
  8.     Define this if you use Spring Utility APIs (org.springframework.core.*/org.springframework.util.*)  
  9. -->  
  10. <dependency>  
  11.   <groupId>org.springframework</groupId>  
  12.   <artifactId>spring-core</artifactId>  
  13.   <version>${org.springframework.version}</version>  
  14. </dependency>  
  15.   
  16. <!--  
  17.     Expression Language (depends on spring-core)  
  18.     Define this if you use Spring Expression APIs (org.springframework.expression.*)  
  19. -->  
  20. <dependency>  
  21.   <groupId>org.springframework</groupId>  
  22.   <artifactId>spring-expression</artifactId>  
  23.   <version>${org.springframework.version}</version>  
  24. </dependency>  
  25.   
  26. <!--  
  27.     Bean Factory and JavaBeans utilities (depends on spring-core)  
  28.     Define this if you use Spring Bean APIs (org.springframework.beans.*)  
  29. -->  
  30. <dependency>  
  31.   <groupId>org.springframework</groupId>  
  32.   <artifactId>spring-beans</artifactId>  
  33.   <version>${org.springframework.version}</version>  
  34. </dependency>  
  35.   
  36. <!--  
  37.     Aspect Oriented Programming (AOP) Framework (depends on spring-core, spring-beans)  
  38.     Define this if you use Spring AOP APIs (org.springframework.aop.*)  
  39. -->  
  40. <dependency>  
  41.   <groupId>org.springframework</groupId>  
  42.   <artifactId>spring-aop</artifactId>  
  43.   <version>${org.springframework.version}</version>  
  44. </dependency>  
  45.   
  46. <!--  
  47.     Application Context (depends on spring-core, spring-expression, spring-aop, spring-beans)  
  48.     This is the central artifact for Spring's Dependency Injection Container and is generally always defined  
  49. -->  
  50. <dependency>  
  51.   <groupId>org.springframework</groupId>  
  52.   <artifactId>spring-context</artifactId>  
  53.   <version>${org.springframework.version}</version>  
  54. </dependency>  
  55.   
  56. <!--  
  57.     Various Application Context utilities, including EhCache, JavaMail, Quartz, and Freemarker integration  
  58.     Define this if you need any of these integrations  
  59. -->  
  60. <dependency>  
  61.   <groupId>org.springframework</groupId>  
  62.   <artifactId>spring-context-support</artifactId>  
  63.   <version>${org.springframework.version}</version>  
  64. </dependency>  
  65.   
  66. <!--  
  67.     Transaction Management Abstraction (depends on spring-core, spring-beans, spring-aop, spring-context)  
  68.     Define this if you use Spring Transactions or DAO Exception Hierarchy  
  69.     (org.springframework.transaction.*/org.springframework.dao.*)  
  70. -->  
  71. <dependency>  
  72.   <groupId>org.springframework</groupId>  
  73.   <artifactId>spring-tx</artifactId>  
  74.   <version>${org.springframework.version}</version>  
  75. </dependency>  
  76.   
  77. <!--  
  78.     JDBC Data Access Library (depends on spring-core, spring-beans, spring-context, spring-tx)  
  79.     Define this if you use Spring's JdbcTemplate API (org.springframework.jdbc.*)  
  80. -->  
  81. <dependency>  
  82.   <groupId>org.springframework</groupId>  
  83.   <artifactId>spring-jdbc</artifactId>  
  84.   <version>${org.springframework.version}</version>  
  85. </dependency>  
  86.   
  87. <!--  
  88.     Object-to-Relation-Mapping (ORM) integration with Hibernate, JPA, and iBatis.  
  89.     (depends on spring-core, spring-beans, spring-context, spring-tx)  
  90.     Define this if you need ORM (org.springframework.orm.*)  
  91. -->  
  92. <dependency>  
  93.   <groupId>org.springframework</groupId>  
  94.   <artifactId>spring-orm</artifactId>  
  95.   <version>${org.springframework.version}</version>  
  96. </dependency>  
  97.   
  98. <!--  
  99.     Object-to-XML Mapping (OXM) abstraction and integration with JAXB, JiBX, Castor, XStream, and XML Beans.  
  100.     (depends on spring-core, spring-beans, spring-context)  
  101.     Define this if you need OXM (org.springframework.oxm.*)  
  102. -->  
  103. <dependency>  
  104.   <groupId>org.springframework</groupId>  
  105.   <artifactId>spring-oxm</artifactId>  
  106.   <version>${org.springframework.version}</version>  
  107. </dependency>  
  108.   
  109. <!--  
  110.     Web application development utilities applicable to both Servlet and Portlet Environments  
  111.     (depends on spring-core, spring-beans, spring-context)  
  112.     Define this if you use Spring MVC, or wish to use Struts, JSF, or another web framework with Spring (org.springframework.web.*)  
  113. -->  
  114. <dependency>  
  115.   <groupId>org.springframework</groupId>  
  116.   <artifactId>spring-web</artifactId>  
  117.   <version>${org.springframework.version}</version>  
  118. </dependency>  
  119.   
  120. <!--  
  121.     Spring MVC for Servlet Environments (depends on spring-core, spring-beans, spring-context, spring-web)  
  122.     Define this if you use Spring MVC with a Servlet Container such as Apache Tomcat (org.springframework.web.servlet.*)  
  123. -->  
  124. <dependency>  
  125.   <groupId>org.springframework</groupId>  
  126.   <artifactId>spring-webmvc</artifactId>  
  127.   <version>${org.springframework.version}</version>  
  128. </dependency>  
  129.   
  130. <!--  
  131.     Spring MVC for Portlet Environments (depends on spring-core, spring-beans, spring-context, spring-web)  
  132.     Define this if you use Spring MVC with a Portlet Container (org.springframework.web.portlet.*)  
  133. -->  
  134. <dependency>  
  135.   <groupId>org.springframework</groupId>  
  136.   <artifactId>spring-webmvc-portlet</artifactId>  
  137.   <version>${org.springframework.version}</version>  
  138. </dependency>  
  139.   
  140. <!--  
  141.     Support for testing Spring applications with tools such as JUnit and TestNG  
  142.     This artifact is generally always defined with a 'test' scope for the integration testing framework and unit testing stubs  
  143. -->  
  144. <dependency>  
  145.   <groupId>org.springframework</groupId>  
  146.   <artifactId>spring-test</artifactId>  
  147.   <version>${org.springframework.version}</version>  
  148.   <scope>test</scope>  
  149. </dependency>  
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值