spring 3.0.5库罐

Ayu*_*man 15 java spring

所有,我从Spring开始并获得Spring 3.0.5发行版.我看到以下罐子:

  • org.springframework.aop-3.0.5.RELEASE.jar
  • org.springframework.asm-3.0.5.RELEASE.jar
  • org.springframework.aspects-3.0.5.RELEASE.jar
  • org.springframework.beans-3.0.5.RELEASE.jar
  • org.springframework.context.support-3.0.5.RELEASE.jar
  • org.springframework.context-3.0.5.RELEASE.jar
  • org.springframework.core-3.0.5.RELEASE.jar
  • org.springframework.expression-3.0.5.RELEASE.jar
  • org.springframework.instrument.tomcat-3.0.5.RELEASE.jar
  • org.springframework.instrument-3.0.5.RELEASE.jar
  • org.springframework.jdbc-3.0.5.RELEASE.jar
  • org.springframework.jms-3.0.5.RELEASE.jar
  • org.springframework.orm-3.0.5.RELEASE.jar
  • org.springframework.oxm-3.0.5.RELEASE.jar
  • org.springframework.test-3.0.5.RELEASE.jar
  • org.springframework.transaction-3.0.5.RELEASE.jar
  • org.springframework.web.portlet-3.0.5.RELEASE.jar
  • org.springframework.web.servlet-3.0.5.RELEASE.jar
  • org.springframework.web.struts-3.0.5.RELEASE.jar
  • org.springframework.web-3.0.5.RELEASE.jar

我想知道哪个jar是针对Spring的哪个模块(ORM,Core,MVC,AOP等).这样我就可以为我的项目选择正确的罐子组.

是否有一个参考解释每个罐子并正确使用?

axt*_*avt 30

有一个下面的图表(来自Spring的3.0模块依赖关系):

替代文字

如您所见,有几组模块:

  • "核心春天" - context及其依赖(asm错过,aop取决于它)

  • 卷筒纸

    • web - 基本的webapp集成
    • webmvc(web.servlet) - Spring MVC框架
    • webmvc-portlet(web.portlet) - 用于portlet的Spring MVC
    • web.struts - Struts集成
  • 数据访问

    • tx(transaction) - 基本交易支持
    • jdbc - JDBC支持
    • orm - ORM集成
  • 其他模块

    • context-support - 与Quartz,Javamail,Ehcache等集成
    • jms,oxm- 分别是JMS和对象XML映射
    • test - 用于单元测试
    • aspects- AspectJ整合(通常不需要)
    • instrument,instrument.tomcat- 装载时间编织

因此,如果使用支持传递依赖性的构建工具(例如Maven),通常只需要从Web数据组声明所需的模块,如果需要,则需要从其他模块声明一些模块.此外,您可能需要声明context才能配置日志记录.

例如,如果要使用Spring MVC和Hibernate创建Web应用程序,则声明webmvc(web.servlet)和orm.如果您不使用Maven,则还需要导入其传递依赖项,如图表所示.

也可以看看: