文档章节

Spring Framework Modules

黑色蝈蝈
 黑色蝈蝈
发布于 2017/05/25 11:56
字数 1086
阅读 3
收藏 0

1. Core Container

核心容器由spring-corespring-beansspring-contextspring-context-support, 和 spring-expression (Spring Expression Language) 模块组成。

spring-core 和 spring-beans 模块提供框架的基础部分, 包括控制反转(IoC)和依赖注入(DI). TheBeanFactory is a sophisticated implementation of the factory pattern. It removes the need for programmatic singletons and allows you to decouple the configuration and specification of dependencies from your actual program logic.

上下文(spring-context) 模块 builds on the solid base provided by the Core and Beans modules: it is a means to access objects in a framework-style manner that is similar to a JNDI registry. The Context module inherits its features from the Beans module and adds support for internationalization (using, for example, resource bundles), event propagation, resource loading, and the transparent creation of contexts by, for example, a Servlet container. The Context module also supports Java EE features such as EJB, JMX, and basic remoting. The ApplicationContext interface is the focal point of the Context module. spring-context-supportprovides support for integrating common third-party libraries into a Spring application context for caching (EhCache, Guava, JCache), mailing (JavaMail), scheduling (CommonJ, Quartz) and template engines (FreeMarker, JasperReports, Velocity).

The spring-expression module provides a powerful Expression Language for querying and manipulating an object graph at runtime. It is an extension of the unified expression language (unified EL) as specified in the JSP 2.1 specification. The language supports setting and getting property values, property assignment, method invocation, accessing the content of arrays, collections and indexers, logical and arithmetic operators, named variables, and retrieval of objects by name from Spring’s IoC container. It also supports list projection and selection as well as common list aggregations.

2. AOP and Instrumentation

The spring-aop module provides an AOP Alliance-compliant aspect-oriented programming implementation allowing you to define, for example, method interceptors and pointcuts to cleanly decouple code that implements functionality that should be separated. Using source-level metadata functionality, you can also incorporate behavioral information into your code, in a manner similar to that of .NET attributes.

The separate spring-aspects module provides integration with AspectJ.

The spring-instrument module provides class instrumentation support and classloader implementations to be used in certain application servers. The spring-instrument-tomcat module contains Spring’s instrumentation agent for Tomcat.

3. Messaging

Spring Framework 4 includes a spring-messaging module with key abstractions from the Spring Integration project such as MessageMessageChannelMessageHandler, and others to serve as a foundation for messaging-based applications. The module also includes a set of annotations for mapping messages to methods, similar to the Spring MVC annotation based programming model.

4. Data Access/Integration

The Data Access/Integration layer consists of the JDBC, ORM, OXM, JMS, and Transaction modules.

The spring-jdbc module provides a JDBC-abstraction layer that removes the need to do tedious JDBC coding and parsing of database-vendor specific error codes.

The spring-tx module supports programmatic and declarative transaction management for classes that implement special interfaces and for all your POJOs (Plain Old Java Objects).

The spring-orm module provides integration layers for popular object-relational mapping APIs, including JPAJDO, and Hibernate. Using the spring-orm module you can use all of these O/R-mapping frameworks in combination with all of the other features Spring offers, such as the simple declarative transaction management feature mentioned previously.

The spring-oxm module provides an abstraction layer that supports Object/XML mapping implementations such as JAXB, Castor, XMLBeans, JiBX and XStream.

The spring-jms module (Java Messaging Service) contains features for producing and consuming messages. Since Spring Framework 4.1, it provides integration with the spring-messaging module.

5. Web

The Web layer consists of the spring-webspring-webmvcspring-websocket, and spring-webmvc-portlet modules.

The spring-web module provides basic web-oriented integration features such as multipart file upload functionality and the initialization of the IoC container using Servlet listeners and a web-oriented application context. It also contains an HTTP client and the web-related parts of Spring’s remoting support.

The spring-webmvc module (also known as the Web-Servlet module) contains Spring’s model-view-controller (MVC) and REST Web Services implementation for web applications. Spring’s MVC framework provides a clean separation between domain model code and web forms and integrates with all of the other features of the Spring Framework.

spring-webmvc-portlet 模块 (Web-Portlet 模块) provides the MVC implementation to be used in a Portlet environment and mirrors the functionality of the Servlet-based spring-webmvc module.

6. Test

spring-test 模块 支持单元测试和集成测试,使用 JUnit 或者 TestNG. 它提供了Spring 上下文的一致性加载和缓存,还提供了mock对象,可以隔离测试你的代码。

 

7. Spring Framework Artifacts

GroupId ArtifactId Description

org.springframework

spring-aop

Proxy-based AOP support

org.springframework

spring-aspects

AspectJ based aspects

org.springframework

spring-beans

Beans support, including Groovy

org.springframework

spring-context

Application context runtime, including scheduling and remoting abstractions

org.springframework

spring-context-support

Support classes for integrating common third-party libraries into a Spring application context

org.springframework

spring-core

Core utilities, used by many other Spring modules

org.springframework

spring-expression

Spring Expression Language (SpEL)

org.springframework

spring-instrument

Instrumentation agent for JVM bootstrapping

org.springframework

spring-instrument-tomcat

Instrumentation agent for Tomcat

org.springframework

spring-jdbc

JDBC support package, including DataSource setup and JDBC access support

org.springframework

spring-jms

JMS support package, including helper classes to send/receive JMS messages

org.springframework

spring-messaging

Support for messaging architectures and protocols

org.springframework

spring-orm

Object/Relational Mapping, including JPA and Hibernate support

org.springframework

spring-oxm

Object/XML Mapping

org.springframework

spring-test

Support for unit testing and integration testing Spring components

org.springframework

spring-tx

Transaction infrastructure, including DAO support and JCA integration

org.springframework

spring-web

Foundational web support, including web client and web-based remoting

org.springframework

spring-webmvc

HTTP-based Model-View-Controller and REST endpoints for Servlet stacks

org.springframework

spring-webmvc-portlet

MVC implementation to be used in a Portlet environment

org.springframework

spring-websocket

WebSocket and SockJS infrastructure, including STOMP messaging support

 

8. Maven依赖关系

spring-core

spring-core-4.3.8.RELEASE.jar

commons-logging-1.2.jar

 

spring-beans

spring-core-4.3.8.RELEASE.jar

commons-logging-1.2.jar

spring-beans-4.3.8.RELEASE.jar

 

spring-context

spring-core-4.3.8.RELEASE.jar

commons-logging-1.2.jar

spring-beans-4.3.8.RELEASE.jar

spring-context-4.3.8.RELEASE.jar

spring-aop-4.3.8.RELEASE.jar

spring-expression-4.3.8.RELEASE.jar

 

spring-aop

spring-core-4.3.8.RELEASE.jar

commons-logging-1.2.jar

spring-beans-4.3.8.RELEASE.jar

spring-aop-4.3.8.RELEASE.jar

 

spring-web

spring-core-4.3.8.RELEASE.jar

commons-logging-1.2.jar

spring-beans-4.3.8.RELEASE.jar

spring-context-4.3.8.RELEASE.jar

spring-aop-4.3.8.RELEASE.jar

spring-expression-4.3.8.RELEASE.jar

spring-web-4.3.8.RELEASE.jar

 

spring-webmvc

spring-core-4.3.8.RELEASE.jar

commons-logging-1.2.jar

spring-beans-4.3.8.RELEASE.jar

spring-context-4.3.8.RELEASE.jar

spring-aop-4.3.8.RELEASE.jar

spring-expression-4.3.8.RELEASE.jar

spring-web-4.3.8.RELEASE.jar

spring-webmvc-4.3.8.RELEASE.jar

© 著作权归作者所有

共有 人打赏支持
黑色蝈蝈
粉丝 4
博文 15
码字总数 7478
作品 0
海淀
程序员
私信 提问
整合Spring+Mybatis框架出现问题

1、项目是使用maven构建,搭建了两个maven modules(web和framework) 在framework里面整合了mybatis,dao和service放在这个模块里面,添加了对应的配置文件spring-db.xml和db.properties 在...

流风回雪pj
2017/06/02
182
3
spring原理案例-基本项目搭建 01 spring framework 下载 官网下载spring jar包

下载spring http://spring.io/ 最重要是在特征下面的这段话,需要注意: All avaible features and modules are described in the Modules section of the reference documentation. Their ......

noteless
2016/02/24
0
0
Spring 3.1、3.2、4.1 文档地址

单页版 http://docs.spring.io/spring/docs/3.1.x/spring-framework-reference/htmlsingle/ http://docs.spring.io/spring/docs/3.2.x/spring-framework-reference/htmlsingle/ http://docs.......

cokolin
2015/05/04
0
0
下载spring时候遇到了好多文件,那些都是干嘛的

spring-framework-3.2.5.RELEASE-dist.zip spring-framework-3.2.5.RELEASE-dist.zip.asc spring-framework-3.2.5.RELEASE-dist.zip.asc.md5 spring-framework-3.2.5.RELEASE-dist.zip.asc.s......

安谧
2016/10/07
732
4
Spring Web Services 2.4.1 和 3.0.0RC1 发布

Spring Web Services 2.4.1 和 3.0.0RC1 发布 。Spring Web Services(Spring WS)是基于 Spring 框架的 Web 服务框架,主要侧重于基于文档驱动的Web服务,提供 SOAP 服务开发,允许通过多种...

淡漠悠然
2017/10/17
337
1

没有更多内容

加载失败,请刷新页面

加载更多

OSChina 周一乱弹 —— 白掌柜说了卖货不卖身

Osc乱弹歌单(2019)请戳(这里) 【今日歌曲】 @爱漫爱 :这是一场修行分享羽肿的单曲《Moony》 手机党少年们想听歌,请使劲儿戳(这里) @clouddyy :开不开心? 开心呀, 我又不爱睡懒觉…...

小小编辑
今天
8
0
大数据教程(11.7)hadoop2.9.1平台上仓库工具hive1.2.2搭建

上一篇文章介绍了hive2.3.4的搭建,然而这个版本已经不能稳定的支持mapreduce程序。本篇博主将分享hive1.2.2工具搭建全过程。先说明:本节就直接在上一节的hadoop环境中搭建了! 一、下载apa...

em_aaron
今天
2
0
开始看《JSP&Servlet学习笔记》

1:WEB应用简介。其中1.2.1对Web容器的工作流程写得不错 2:编写Servlet。搞清楚了Java的Web目录结构,以及Web.xml的一些配置作用。特别是讲了@WebServlet标签 3:请求与响应。更细致的讲了从...

max佩恩
今天
4
0
mysql分区功能详细介绍,以及实例

一,什么是数据库分区 前段时间写过一篇关于mysql分表的的文章,下面来说一下什么是数据库分区,以mysql为例。mysql数据库中的数据是以文件的形势存在磁盘上的,默认放在/mysql/data下面(可...

吴伟祥
今天
3
0
SQL语句查询

1.1 排序 通过order by语句,可以将查询出的结果进行排序。放置在select语句的最后。 格式: SELECT * FROM 表名 ORDER BY 排序字段ASC|DESC; ASC 升序 (默认) DESC 降序 1.查询所有商品信息,...

stars永恒
今天
4
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部