@@ -121,122 +121,127 @@ robust, __maintainable__ applications.
121
121
=== Modules
122
122
The Spring Framework consists of features organized into about 20 modules. These modules
123
123
are grouped into Core Container, Data Access/Integration, Web, AOP (Aspect Oriented
124
- Programming), Instrumentation, and Test, as shown in the following diagram.
124
+ Programming), Instrumentation, Messaging, and Test, as shown in the following diagram.
125
125
126
126
.Overview of the Spring Framework
127
127
image::images/spring-overview.png[width=400]
128
128
129
- The next parts will list, for each feature, the available modules with their artifact name and their goal.
130
- Artifacts names are the reference names to use in <<dependency-management,Dependency Management tools>>.
129
+ The following sections list the available modules for each feature along with their
130
+ artifact name and the topics they cover. Artifact names correlate to _artifact IDs_ used
131
+ in <<dependency-management,Dependency Management tools>>.
131
132
132
133
133
134
[[overview-core-container]]
134
135
==== Core Container
135
- The <<beans-introduction,__Core Container__>> consists of the `spring-core`, `spring-beans`, `spring-context`, and
136
- `spring-expression` (Spring Expression Language) modules.
137
-
138
- The `spring-core` and `spring-beans` modules <<beans-introduction,provide the fundamental parts of the framework>>,
139
- including the IoC and Dependency Injection features. The `BeanFactory` is
140
- a sophisticated implementation of the factory pattern. It removes the need for
141
- programmatic singletons and allows you to decouple the configuration and specification
142
- of dependencies from your actual program logic.
143
-
144
- The <<context-introduction,__Context__>> (`spring-context`) module builds on the solid base provided by the
145
- <<beans-introduction,__Core and Beans__>> modules: it is a means to access objects in a
146
- framework-style manner that is similar to a JNDI registry. The Context module inherits
147
- its features from the Beans module and adds support for internationalization (using, for
148
- example, resource bundles), event-propagation, resource-loading, and the transparent
149
- creation of contexts by, for example, a servlet container. The Context module also
150
- supports Java EE features such as EJB, JMX ,and basic remoting. The `ApplicationContext`
151
- interface is the focal point of the Context module.
152
-
153
- The `spring-expression` module provides a powerful <<expressions,__Expression Language__>>
154
- for querying and manipulating an object graph at runtime. It is an extension of
155
- the unified expression language (unified EL) as specified in the JSP 2.1 specification.
156
- The language supports setting and getting property values, property assignment, method
157
- invocation, accessing the context of arrays, collections and indexers, logical and
158
- arithmetic operators, named variables, and retrieval of objects by name from Spring's
159
- IoC container. It also supports list projection and selection as well as common list
160
- aggregations.
136
+ The <<beans-introduction,__Core Container__>> consists of the `spring-core`,
137
+ `spring-beans`, `spring-context`, and `spring-expression` (Spring Expression Language)
138
+ modules.
139
+
140
+ The `spring-core` and `spring-beans` modules <<beans-introduction,provide the fundamental
141
+ parts of the framework>>, including the IoC and Dependency Injection features. The
142
+ `BeanFactory` is a sophisticated implementation of the factory pattern. It removes the
143
+ need for programmatic singletons and allows you to decouple the configuration and
144
+ specification of dependencies from your actual program logic.
145
+
146
+ The <<context-introduction,__Context__>> (`spring-context`) module builds on the solid
147
+ base provided by the <<beans-introduction,__Core and Beans__>> modules: it is a means to
148
+ access objects in a framework-style manner that is similar to a JNDI registry. The
149
+ Context module inherits its features from the Beans module and adds support for
150
+ internationalization (using, for example, resource bundles), event propagation, resource
151
+ loading, and the transparent creation of contexts by, for example, a Servlet container.
152
+ The Context module also supports Java EE features such as EJB, JMX, and basic remoting.
153
+ The `ApplicationContext` interface is the focal point of the Context module.
154
+
155
+ The `spring-expression` module provides a powerful <<expressions,__Expression
156
+ Language__>> for querying and manipulating an object graph at runtime. It is an extension
157
+ of the unified expression language (unified EL) as specified in the JSP 2.1
158
+ specification. The language supports setting and getting property values, property
159
+ assignment, method invocation, accessing the content of arrays, collections and indexers,
160
+ logical and arithmetic operators, named variables, and retrieval of objects by name from
161
+ Spring's IoC container. It also supports list projection and selection as well as common
162
+ list aggregations.
163
+
161
164
162
165
[[overview-aop-instrumentation]]
163
166
==== AOP and Instrumentation
164
167
The `spring-aop` module provides an <<aop-introduction,__AOP__>> Alliance-compliant
165
168
aspect-oriented programming implementation allowing you to define, for example,
166
- method- interceptors and pointcuts to cleanly decouple code that implements functionality
169
+ method interceptors and pointcuts to cleanly decouple code that implements functionality
167
170
that should be separated. Using source-level metadata functionality, you can also
168
171
incorporate behavioral information into your code, in a manner similar to that of .NET
169
172
attributes.
170
173
171
- The separate `spring-aspets ` module provides integration with AspectJ.
174
+ The separate `spring-aspects ` module provides integration with AspectJ.
172
175
173
176
The `spring-instrument` module provides class instrumentation support and classloader
174
177
implementations to be used in certain application servers.
175
178
179
+
176
180
[[overview-messaging]]
177
181
==== Messaging
178
- Spring Framework 4 includes a new `spring-messaging` module with key abstractions from
179
- the _Spring Integration_ project such as `Message`, `MessageChannel`,
180
- `MessageHandler` and others to serve as a foundation for messaging-based applications. The
181
- module also includes a set of annotations for mapping messages to methods, similar to the
182
- Spring MVC annotation based programming model.
182
+ Spring Framework 4 includes a `spring-messaging` module with key abstractions from the
183
+ _Spring Integration_ project such as `Message`, `MessageChannel`, `MessageHandler`, and
184
+ others to serve as a foundation for messaging-based applications. The module also
185
+ includes a set of annotations for mapping messages to methods, similar to the Spring MVC
186
+ annotation based programming model.
187
+
183
188
184
189
[[overview-data-access]]
185
190
==== Data Access/Integration
186
- The __Data Access/Integration__ layer consists of the JDBC, ORM, OXM, JMS and
191
+ The __Data Access/Integration__ layer consists of the JDBC, ORM, OXM, JMS, and
187
192
Transaction modules.
188
193
189
- The `spring-jdbc` module provides a <<jdbc-introduction,JDBC>>-abstraction layer that removes the
190
- need to do tedious JDBC coding and parsing of database-vendor specific error codes.
194
+ The `spring-jdbc` module provides a <<jdbc-introduction,JDBC>>-abstraction layer that
195
+ removes the need to do tedious JDBC coding and parsing of database-vendor specific error
196
+ codes.
191
197
192
198
The `spring-orm` module provides integration layers for popular
193
- <<orm-introduction,object-relational mapping>> APIs, including <<orm-jpa,JPA>>, <<orm-jdo,JDO>>, and
194
- <<orm-hibernate,Hibernate>> (see also `spring-orm-hibernate4` for Hibernate 4 support).
195
- Using the ORM package you can use all of these O/R-mapping frameworks in combination with all of the
196
- other features Spring offers, such as the simple declarative transaction management feature mentioned previously.
199
+ <<orm-introduction,object-relational mapping>> APIs, including <<orm-jpa,JPA>>,
200
+ <<orm-jdo,JDO>>, and <<orm-hibernate,Hibernate>>. Using the `spring-orm` module you can
201
+ use all of these O/R-mapping frameworks in combination with all of the other features
202
+ Spring offers, such as the simple declarative transaction management feature mentioned
203
+ previously.
197
204
198
- The `spring-oxm` module provides an abstraction layer that supports <<oxm,Object/XML mapping>>
199
- implementations for JAXB, Castor, XMLBeans, JiBX and XStream.
205
+ The `spring-oxm` module provides an abstraction layer that supports <<oxm,Object/XML
206
+ mapping>> implementations such as JAXB, Castor, XMLBeans, JiBX and XStream.
200
207
201
208
The `spring-jms` module (<<jms,Java Messaging Service>>) contains features for producing and
202
- consuming messages. Since Spring Framework 4.1, it provides an integration with the
209
+ consuming messages. Since Spring Framework 4.1, it provides integration with the
203
210
`spring-messaging` module.
204
211
205
212
The `spring-tx` module supports <<transaction,programmatic and declarative transaction>>
206
- management for classes that implement special interfaces and for __all your POJOs (plain
207
- old Java objects)__.
208
-
213
+ management for classes that implement special interfaces and for __all your POJOs (Plain
214
+ Old Java Objects)__.
209
215
210
216
211
217
[[overview-web]]
212
218
==== Web
213
- The __Web__ layer consists of the `spring-web`, `spring-webmvc`, `spring-websocket` and `spring-webmvc-portlet` modules.
219
+ The __Web__ layer consists of the `spring-web`, `spring-webmvc`, `spring-websocket`, and
220
+ `spring-webmvc-portlet` modules.
214
221
215
222
The `spring-web` module provides basic web-oriented integration features such as
216
- multipart file- upload functionality and the initialization of the IoC container using
217
- servlet listeners and a web-oriented application context. It also contains the
223
+ multipart file upload functionality and the initialization of the IoC container using
224
+ Servlet listeners and a web-oriented application context. It also contains the
218
225
web-related parts of Spring's remoting support.
219
226
220
- The `spring-webmvc` module (also known as `__Web-Servlet__) contains Spring's model-view-controller
221
- (<<mvc-introduction,__MVC__>>) implementation for web applications. Spring's MVC
222
- framework provides a clean separation between domain model code and web forms, and
223
- integrates with all the other features of the Spring Framework.
224
-
225
- The `spring-webmvc-portlet` module (also __Web-Portlet__ module) provides the MVC implementation to be used in a portlet
226
- environment and mirrors the functionality of Web-Servlet module.
227
-
228
-
229
-
230
-
227
+ The `spring-webmvc` module (also known as the __Web-Servlet__ module) contains Spring's
228
+ model-view-controller (<<mvc-introduction,__MVC__>>) implementation for web applications.
229
+ Spring's MVC framework provides a clean separation between domain model code and web
230
+ forms and integrates with all of the other features of the Spring Framework.
231
231
232
+ The `spring-webmvc-portlet` module (also known as the __Web-Portlet__ module) provides
233
+ the MVC implementation to be used in a Portlet environment and mirrors the functionality
234
+ of the `spring-webmvc` module.
232
235
233
236
234
237
[[overview-testing]]
235
238
==== Test
236
- The `spring-test` module supports the testing of Spring components with JUnit or TestNG. It
237
- provides consistent loading of Spring ApplicationContexts and caching of those contexts.
238
- It also provides mock objects that you can use to test your code in isolation.
239
-
239
+ The `spring-test` module supports the <<unit-testing,unit testing>> and
240
+ <<integration-testing,integration testing>> of Spring components with JUnit or TestNG. It
241
+ provides consistent <<testcontext-ctx-management,loading>> of Spring
242
+ ++ApplicationContext++s and <<testcontext-ctx-management-caching,caching>> of those
243
+ contexts. It also provides <<mock-objects,mock objects>> that you can use to test your
244
+ code in isolation.
240
245
241
246
242
247
@@ -993,9 +998,9 @@ Framework 4.0 introduces several new features for use in unit and integration te
993
998
Spring 4.1 introduces a much simpler infrastructure <<jms-annotated,to register JMS
994
999
listener endpoints>> by annotating bean methods with
995
1000
{javadoc-baseurl}/org/springframework/jms/annotation/JmsListener.html[`@JmsListener`].
996
- The XML namespace has been enhanced to support this new style (`jms:annotation-driven`)
997
- and it is also possible to fully configure the infrastructure using Java config (
998
- {javadoc-baseurl}/org/springframework/jms/annotation/EnableJms.html[`@EnableJms`],
1001
+ The XML namespace has been enhanced to support this new style (`jms:annotation-driven`),
1002
+ and it is also possible to fully configure the infrastructure using Java config
1003
+ ( {javadoc-baseurl}/org/springframework/jms/annotation/EnableJms.html[`@EnableJms`],
999
1004
`JmsListenerContainerFactory`). It is also possible to register listener endpoints
1000
1005
programmatically using
1001
1006
{javadoc-baseurl}/org/springframework/jms/annotation/JmsListenerConfigurer.html[`JmsListenerConfigurer`].
@@ -1004,18 +1009,18 @@ Spring 4.1 also aligns its JMS support to allow you to benefit from the `spring-
1004
1009
abstraction introduced in 4.0, that is:
1005
1010
1006
1011
* Message listener endpoints can have a more flexible signature and benefit from
1007
- standard messaging annotations such as `@Payload`, `@Header`, `@Headers` and `@SendTo`. It
1012
+ standard messaging annotations such as `@Payload`, `@Header`, `@Headers`, and `@SendTo`. It
1008
1013
is also possible to use a standard `Message` in lieu of `javax.jms.Message` as method
1009
- argument
1014
+ argument.
1010
1015
* A new {javadoc-baseurl}/org/springframework/jms/core/JmsMessageOperations.html[`JmsMessageOperations`]
1011
1016
interface is available and permits `JmsTemplate` like operations using the `Message`
1012
- abstraction
1017
+ abstraction.
1013
1018
1014
1019
Finally, Spring 4.1 provides additional miscellaneous improvements:
1015
1020
1016
1021
* Synchronous request-reply operations support in `JmsTemplate`
1017
1022
* Listener priority can be specified per `<jms:listener/>` element
1018
- * Recovery options for the message listener container is configurable using a
1023
+ * Recovery options for the message listener container are configurable using a
1019
1024
{javadoc-baseurl}/org/springframework/util/backoff/BackOff.html[`BackOff`] implementation
1020
1025
* JMS 2.0 shared consumers are supported
1021
1026
@@ -1025,35 +1030,35 @@ Spring 4.1 supports <<cache-jsr-107,JCache (JSR-107) annotations>> using Spring'
1025
1030
existing cache configuration and infrastructure abstraction; no changes are required
1026
1031
to use the standard annotations.
1027
1032
1028
- Spring 4.1 also improves its own abstraction significantly:
1033
+ Spring 4.1 also improves its own caching abstraction significantly:
1029
1034
1030
1035
* Caches can be resolved at runtime using a
1031
1036
<<cache-annotations-cacheable-cache-resolver,`CacheResolver`>>. As a result the
1032
- `value` argument defining the cache name(s) to use is no longer mandatory
1037
+ `value` argument defining the cache name(s) to use is no longer mandatory.
1033
1038
* More operation-level customizations: cache resolver, cache manager, key
1034
1039
generator
1035
1040
* A new <<cache-annotations-config,`@CacheConfig` class-level annotation>> allows
1036
- to share common settings at class level **without** enabling any cache operation
1041
+ common settings to be shared at the class level **without** enabling any cache operation.
1037
1042
* Better exception handling of cached methods using `CacheErrorHandler`
1038
1043
1039
- Spring 4.1 also has a breaking change in the `CacheInterface` as a new
1040
- `putIfAbsent` method has been added.
1044
+ Spring 4.1 also has a breaking change in the `CacheInterface` as a new `putIfAbsent`
1045
+ method has been added.
1041
1046
1042
1047
=== Web Improvements
1043
1048
1044
- * The JDK 1.8 `java.util.Optional` is now supported for `@RequestParam`, `@RequestHeader`
1045
- and `@MatrixVariable` controller method arguments while `ListenableFuture` is supported as
1049
+ * JDK 1.8's `java.util.Optional` is now supported for `@RequestParam`, `@RequestHeader`,
1050
+ and `@MatrixVariable` controller method arguments, while `ListenableFuture` is supported as
1046
1051
a return value alternative to `DeferredResult` where an underlying service (or perhaps a
1047
1052
call to `AsyncRestTemplate`) already returns `ListenableFuture`.
1048
1053
* Jackson's `@JsonView` is supported directly on `@ResponseBody` and `ResponseEntity`
1049
- controller methods for serializing different amounts of detail for the same POJO,
1050
- e.g. summary vs detail page. This is also supported with View-based rendering by
1054
+ controller methods for serializing different amounts of detail for the same POJO -- for
1055
+ example, summary vs. detail page. This is also supported with View-based rendering by
1051
1056
adding the serialization view type as a model attribute under a special key.
1052
1057
See <<mvc-ann-jsonview>> for details.
1053
1058
* Jackson based XML serialization is now supported using
1054
1059
https://github.com/FasterXML/jackson-dataformat-xml[jackson-dataformat-xml] extension.
1055
1060
When using `@EnableWebMvc` or `<mvc:annotation-driven/>`, Jackson will be used by default
1056
- instead of JAXB2 if jackson-dataformat-xml classes are found in the classpath.
1061
+ instead of JAXB2 if ` jackson-dataformat-xml` classes are found in the classpath.
1057
1062
* JSONP is now supported with Jackson.
1058
1063
* A `@ControllerAdvice` can now also implement `ResponseBodyAdvice` in which case it will be
1059
1064
called after the controller method returns but before the response is written and
@@ -1070,12 +1075,12 @@ Spring 4.1 also has a breaking change in the `CacheInterface` as a new
1070
1075
as JSPs can also build links to controllers by referring to their mappings by name.
1071
1076
A default name is assigned to every `@RequestMapping`. For example `FooController` with method
1072
1077
`handleFoo` is assigned "FC#handleFoo" by default but the naming strategy is customizable
1073
- and can be also be set explicitly through the new name attribute on `@RequestMapping`.
1074
- A new mvcUrl Spring JSP tag makes this easy to use in JSP pages.
1078
+ and can be also be set explicitly through the new ` name` attribute on `@RequestMapping`.
1079
+ A new ` mvcUrl` Spring JSP tag makes this easy to use in JSP pages.
1075
1080
The same can be done for any other view technology.
1076
1081
* The familiar `ResponseEntity` now has a builder-style API that guides controller methods
1077
1082
towards the preparation of server-side responses, e.g. `ResponseEntity.ok()`.
1078
- For the client side there is a new RequestEntity also offering a builder-style API that
1083
+ For the client side there is a new ` RequestEntity` also offering a builder-style API that
1079
1084
guides towards the preparation of client-side HTTP requests.
1080
1085
* MVC Java config and XML namespace:
1081
1086
** View resolver configuration -- if you've had to configure view resolution with content
@@ -1085,7 +1090,7 @@ Spring 4.1 also has a breaking change in the `CacheInterface` as a new
1085
1090
without the need for controller logic, view controllers now have built-in support for
1086
1091
redirecting and setting the response status. An application can use this to configure
1087
1092
redirect URLs, render 404 responses with a view, send "no content" responses, etc.
1088
- Some use cases https://jira.spring.io/browse/SPR-11543?focusedCommentId=100308&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-100308[listed here].
1093
+ Some use cases are https://jira.spring.io/browse/SPR-11543?focusedCommentId=100308&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-100308[listed here].
1089
1094
** Path matching -- these frequently used customizations are now built-in and have also been
1090
1095
backported to 4.0. See <<mvc-config-path-matching>> for details.
1091
1096
* http://groovy-lang.org/docs/groovy-2.3.6/html/documentation/markup-template-engine.html[Groovy markup template]
@@ -1120,7 +1125,7 @@ Spring 4.1 also has a breaking change in the `CacheInterface` as a new
1120
1125
* JSON responses can be asserted with https://github.com/skyscreamer/JSONassert[JSON Assert]
1121
1126
as an extra option to using JSONPath much like it has been possible to do for XML with
1122
1127
XMLUnit.
1123
- * `MockMvcBuilder` "recipies" can now be created with the help of `MockMvcConfigurer`. This
1128
+ * `MockMvcBuilder` _recipes_ can now be created with the help of `MockMvcConfigurer`. This
1124
1129
was added to make it easy to apply Spring Security setup but can be used to encapsulate
1125
1130
common setup for any 3rd party framework or within a project.
1126
1131
* `MockRestServiceServer` now supports the `AsyncRestTemplate` for client-side testing.
0 commit comments