spring 3.0.5库jar

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

  • 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等)。 这样我就可以为我的项目选择正确的jar子组。

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

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

替代文字

如您所见,有几组模块:

  • “核心spring” – context及其依赖( asm被遗漏, aop取决于它)

  • 卷筒纸

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

    • txtransaction ) – 基本事务支持
    • jdbc – JDBC支持
    • orm – ORM集成
  • 其他模块

    • context-support – 与Quartz,Javamail,Ehcache等集成
    • jmsoxm – 分别是JMS和object-XML映射
    • test – 用于unit testing
    • aspects – AspectJ集成 (通常不需要)
    • instrumentinstrument.tomcat – 加载 – 时间编织

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

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

也可以看看:

  • Spring 3.0模块依赖关系图
  • 使用Maven获取Spring 3 Artifacts
  • 在Spring中记录依赖项

我和Maven一起去。 即使您不能在项目中使用它,您也可以使用它创建一个虚拟项目,或者查看spring jar依赖项。

使用Maven,您只需添加所需的jar子: -orm-aop-webmvc (列表中缺少),maven将获取所需的所有其他jar子。