Skip to content

Commit 1f6c40f

Browse files
committed
Polish recent changes to reference manual
1 parent 98eb0f7 commit 1f6c40f

File tree

1 file changed

+94
-89
lines changed

1 file changed

+94
-89
lines changed

src/asciidoc/index.adoc

+94-89
Original file line numberDiff line numberDiff line change
@@ -121,122 +121,127 @@ robust, __maintainable__ applications.
121121
=== Modules
122122
The Spring Framework consists of features organized into about 20 modules. These modules
123123
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.
125125

126126
.Overview of the Spring Framework
127127
image::images/spring-overview.png[width=400]
128128

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>>.
131132

132133

133134
[[overview-core-container]]
134135
==== 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+
161164

162165
[[overview-aop-instrumentation]]
163166
==== AOP and Instrumentation
164167
The `spring-aop` module provides an <<aop-introduction,__AOP__>> Alliance-compliant
165168
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
167170
that should be separated. Using source-level metadata functionality, you can also
168171
incorporate behavioral information into your code, in a manner similar to that of .NET
169172
attributes.
170173

171-
The separate `spring-aspets` module provides integration with AspectJ.
174+
The separate `spring-aspects` module provides integration with AspectJ.
172175

173176
The `spring-instrument` module provides class instrumentation support and classloader
174177
implementations to be used in certain application servers.
175178

179+
176180
[[overview-messaging]]
177181
==== 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+
183188

184189
[[overview-data-access]]
185190
==== 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
187192
Transaction modules.
188193

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.
191197

192198
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.
197204

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.
200207

201208
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
203210
`spring-messaging` module.
204211

205212
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)__.
209215

210216

211217
[[overview-web]]
212218
==== 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.
214221

215222
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
218225
web-related parts of Spring's remoting support.
219226

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.
231231

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.
232235

233236

234237
[[overview-testing]]
235238
==== 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.
240245

241246

242247

@@ -993,9 +998,9 @@ Framework 4.0 introduces several new features for use in unit and integration te
993998
Spring 4.1 introduces a much simpler infrastructure <<jms-annotated,to register JMS
994999
listener endpoints>> by annotating bean methods with
9951000
{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`],
9991004
`JmsListenerContainerFactory`). It is also possible to register listener endpoints
10001005
programmatically using
10011006
{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-
10041009
abstraction introduced in 4.0, that is:
10051010

10061011
* 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
10081013
is also possible to use a standard `Message` in lieu of `javax.jms.Message` as method
1009-
argument
1014+
argument.
10101015
* A new {javadoc-baseurl}/org/springframework/jms/core/JmsMessageOperations.html[`JmsMessageOperations`]
10111016
interface is available and permits `JmsTemplate` like operations using the `Message`
1012-
abstraction
1017+
abstraction.
10131018

10141019
Finally, Spring 4.1 provides additional miscellaneous improvements:
10151020

10161021
* Synchronous request-reply operations support in `JmsTemplate`
10171022
* 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
10191024
{javadoc-baseurl}/org/springframework/util/backoff/BackOff.html[`BackOff`] implementation
10201025
* JMS 2.0 shared consumers are supported
10211026

@@ -1025,35 +1030,35 @@ Spring 4.1 supports <<cache-jsr-107,JCache (JSR-107) annotations>> using Spring'
10251030
existing cache configuration and infrastructure abstraction; no changes are required
10261031
to use the standard annotations.
10271032

1028-
Spring 4.1 also improves its own abstraction significantly:
1033+
Spring 4.1 also improves its own caching abstraction significantly:
10291034

10301035
* Caches can be resolved at runtime using a
10311036
<<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.
10331038
* More operation-level customizations: cache resolver, cache manager, key
10341039
generator
10351040
* 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.
10371042
* Better exception handling of cached methods using `CacheErrorHandler`
10381043

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.
10411046

10421047
=== Web Improvements
10431048

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
10461051
a return value alternative to `DeferredResult` where an underlying service (or perhaps a
10471052
call to `AsyncRestTemplate`) already returns `ListenableFuture`.
10481053
* 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
10511056
adding the serialization view type as a model attribute under a special key.
10521057
See <<mvc-ann-jsonview>> for details.
10531058
* Jackson based XML serialization is now supported using
10541059
https://github.com/FasterXML/jackson-dataformat-xml[jackson-dataformat-xml] extension.
10551060
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.
10571062
* JSONP is now supported with Jackson.
10581063
* A `@ControllerAdvice` can now also implement `ResponseBodyAdvice` in which case it will be
10591064
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
10701075
as JSPs can also build links to controllers by referring to their mappings by name.
10711076
A default name is assigned to every `@RequestMapping`. For example `FooController` with method
10721077
`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.
10751080
The same can be done for any other view technology.
10761081
* The familiar `ResponseEntity` now has a builder-style API that guides controller methods
10771082
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
10791084
guides towards the preparation of client-side HTTP requests.
10801085
* MVC Java config and XML namespace:
10811086
** 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
10851090
without the need for controller logic, view controllers now have built-in support for
10861091
redirecting and setting the response status. An application can use this to configure
10871092
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].
10891094
** Path matching -- these frequently used customizations are now built-in and have also been
10901095
backported to 4.0. See <<mvc-config-path-matching>> for details.
10911096
* 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
11201125
* JSON responses can be asserted with https://github.com/skyscreamer/JSONassert[JSON Assert]
11211126
as an extra option to using JSONPath much like it has been possible to do for XML with
11221127
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
11241129
was added to make it easy to apply Spring Security setup but can be used to encapsulate
11251130
common setup for any 3rd party framework or within a project.
11261131
* `MockRestServiceServer` now supports the `AsyncRestTemplate` for client-side testing.

0 commit comments

Comments
 (0)