Spring Module

As of Spring version 3.1, Spring comes with 20 modules, packaged into 20 JAR files.

 

JAR File

Description

aop

This module contains all the classes you need to use Spring’s AOP features within your application. You also need to include this JAR in your application if you plan to use other features in Spring that use AOP, such as declarative transaction management. Moreover, classes that support integration with AspectJ are packed in this module too.

 

asm

ASM (asm.ow2.org) is a Java bytecode manipulation framework. Spring depends on this library to analyze the bytecode of Spring beans, dynamically modify them, and generate new bytecode during runtime.

 

aspects

This module contains all the classes for advanced integration with the AspectJ AOP library. For example, if you are using Java classes for your Spring configuration and need AspectJ-style annotation-driven transaction management, you will need this module.

 

beans

This module contains all the classes for supporting Spring’s manipulation of Spring beans. Most of the classes here support Spring’s bean factory implementation. For example, the classes required to parse the Spring’s XML configuration file and Java annotations were packed into this module.

 

context

This module contains classes that provide many extensions to the Spring core. You will find that all classes need to use Spring’s ApplicationContext feature, along with classes for EJB, Java Naming and Directory Interface (JNDI), and Java Management Extensions (JMX) integration. Also contained in this module are the Spring remoting classes, classes for integration with dynamic scripting languages (e.g., JRuby, Groovy, BeanShell), the Beans Validation (JSR-303) API, scheduling and task execution, and so on.

 

context.support

This module contains further extensions to the spring-context module. On the user interface side, there are classes for mail support and integration with templating engines such as Velocity, FreeMarker, and JasperReports. Also, integration with various task execution and scheduling libraries including CommonJ and Quartz are packaged here.

 

core

This is the core module that you will need for every Spring application. In this JAR file, you will find all the classes that are shared among all other Spring modules, for example, classes for accessing configuration files. Also, in this JAR, you will find a selection of extremely useful utility classes that are used throughout the Spring codebase and that you can use in your own application.

 

expression

This module contains all support classes for Spring Expression Language (SpEL).

 

instrument

This module includes Spring’s instrumentation agent for Java Virtual Machine (JVM) bootstrapping. This JAR file is required for using load-time weaving with AspectJ in a Spring application.

 

instrument.tomcat

This module includes Spring’s instrumentation agent for JVM bootstrapping in the Tomcat server.

 

jdbc

This module includes all classes for JDBC support. You will need this module for all applications that require database access. Classes for supporting data sources, JDBC data types, JDBC templates, native JDBC connections, and so on, are packed in this module.

 

jms

This module includes all classes for JMS support.

 

orm

This module extends Spring’s standard JDBC feature set with support for popular ORM tools including Hibernate, iBATIS (but not MyBatis), JDO, and JPA. Many of the classes in this JAR depend on classes contained in spring-jdbc.jar, so you definitely need to include that in your application as well.

 

oxm

This modules provide support for OXM (object to XML mapping). Classes for abstraction of XML marshaling and unmarshaling and support for popular tools like Castor, JAXB, XMLBeans, XStream, and so on, are packed into this module.

 

web.struts

This module include all classes for integration between Spring and the Struts web framework.

 

test

Spring provides a set of mock classes to aid in testing your applications. Many of these mock classes are used within the Spring test suite, so they are well-tested and make testing your applications much simpler. Certainly we have found great use for the mock HttpServletRequest and HttpServletResponse classes in unit tests for our web applications. On the other hand, Spring provides a tight integration with the JUnit unit testing framework, and many classes that support the development of JUnit test cases are provided in this module; for example, the SpringJUnit4ClassRunner provides a simple way to bootstrap the Spring ApplicationContext in a unit test environment.

 

transaction

This module provides all classes for supporting Spring’s transaction infrastructure. You will find classes from the transaction abstraction layer to support of the Java Transaction API (JTA) and integration with application servers from major vendors.

 

web

This module contains the core classes for using Spring in your web applications, including classes for loading an ApplicationContext feature automatically, file upload support classes, and a bunch of useful classes for performing repetitive tasks such as parsing int values from the query string.

 

web.servlet

This module contains all the classes for Spring’s own MVC framework. If you are using a separate MVC framework for your application, then you won’t need any of the classes from this JAR file.

 

web.portlet

This module provides support for using Spring MVC in developing portlets for deployment to a portal server environment.

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
SpringModule是一个在Spring框架中扮演重要角色的类。它是用来管理和加载模块的。另外,SpringModule是基于模块管理器(ModuleManager)和模块服务(ModuleService)提供的接口来实现的。它的核心功能是处理模块的生命周期和依赖关系。从最基础的SpringModule开始,它是Spring框架中的核心组件之一。它与其他模块一起构成了Spring的核心容器(Core Container)。核心容器由spring-core、spring-beans、spring-context、spring-context-support和spring-expression(Spring表达式语言)模块组成。除了核心容器外,还有spring-webmvc模块,它提供了Spring的模型-视图-控制器(MVC)和REST Web服务实现,用于Web应用程序。Spring的MVC框架提供了领域模型代码和Web表单之间的清晰分离,并与Spring框架的其他功能集成。综上所述,SpringModuleSpring框架中负责管理和加载模块的类,它与其他核心模块一起构成了Spring的核心容器,并为Web应用程序提供了MVC和REST Web服务的实现。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [Jarslink源码解析-----SpringModule](https://blog.csdn.net/bigdogLIU/article/details/112343907)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] - *2* *3* [Spring modules介绍](https://blog.csdn.net/tanga842428/article/details/52875673)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值