Generally update chapter and add documentation for 4.2 including
the return value types ResponseBodyEmitter, SseEmitter, and
StreamingResponseBody.
Issue: SPR-12672
The `javadoc-baseurl` asciidoctor attribute is now externalized
(i.e. not included directly in the document anymore).
This allows to properly render javadoc links in single pages, whereas
those URLs were previoulsy only supported in the single page version.
Prior to this commit, @DirtiesContext could only be used to close a
test ApplicationContext after an entire test class or after a test
method; however, there are some use cases for which it would be
beneficial to close a test ApplicationContext before a given test class
or test method -- for example, if some rogue (i.e., yet to be
determined) test within a large test suite has corrupted the original
configuration for the ApplicationContext.
This commit provides a solution to such testing challenges by
introducing the following modes for @DirtiesContext.
- MethodMode.BEFORE_METHOD: configured via the new methodMode attribute
- ClassMode.BEFORE_CLASS and ClassMode.BEFORE_EACH_TEST_METHOD: both
configured via the existing classMode attribute
Issue: SPR-12429
Various documentation improvements related to `@Configuration` and
`Bean`. Better describe how method parameter can be used to declare
dependencies of a particular bean. Also add an explicit mentions related
to "hard-wiring" of dependencies in configuration classes.
Issue: SPR-12773
The upgrade to a more recent asciidoc format led to a bunch of of
broken Admonition as the text block now requires four equal signs while
previous versions tolerated only 3.
Issue: SPR-12791
Core and Web chapters are important chapters in the Spring Framework
reference documentation, and splitting them in multiple files will
help to evolve the documentation while not creating too many files.
Issue: SPR-12309
The reference documentation is now organized in asciidoc bookparts.
Bookparts sections can be also put in separate files, when their
size and theme are important enough to justify that.
Documentation Layout:
```
index
|-- overview
|
|-- whats-new
|
|-- core
| |-- core-beans
| |-- core-aop
|-- testing
|
|-- data-access
|
|-- web
| |-- web-mvc
| |-- web-view
|-- integration
|
|-- appendix
|-- appx-spring-tld
|-- appx-spring-form-tld
```
Supersedes and closes#641
Issue: SPR-12309
When a bean is retrieved via JNDI using Java config, we apply the same
inferred more for destruction callbacks as for any other bean. If an
object from the JNDI tree has a `close` or `shutdown` method, the
context calls it when it shutdowns.
Unfortunately, we have no way to know that the bean was retrieved via
JNDI and that its lifecycle is managed outside the application.
The documentation has been updated to reflect that problem explicitly.
Issue: SPR-12551
Deprecated CommonsPoolTargetSource (supporting commons pool 1.5+) in
favor of CommonsPool2TargetSource with a similar contract.
Commons Pool 2.x uses object equality while Commons Pool 1.x used
identity equality. This clearly means that Commons Pool 2 behaves
differently if several instances having the same identity according to
their `Object#equals(Object)` method are managed in the same pool. To
provide a smooth upgrade, a backward-compatible pool is created by
default; use `setUseObjectEquality(boolean)` if you need the standard
Commons Pool 2.x behavior.
Issue: SPR-12532
This commit adds support for a same origin check that compares
Origin header to Host header. It also changes the default setting
from all origins allowed to only same origin allowed.
Issues: SPR-12697, SPR-12685
Update documentation to explicitly mention that the cache interceptor
must be fully initialized to provide the expected behavior and therefore
initialization code should not rely on this feature, i;e. typically in
PostConstruct callback.
Since the Transactional infrastructure has the exact same infrastructure,
update that section of the doc as well.
Issue: SPR-12700
This commit adds ResponseBodyEmitter and SseEmitter (and also
ResponseEntity<ResponseBodyEmitter> and ResponseEntity<SseEmitter>) as
new return value types supported on @RequestMapping controller methods.
See Javadoc on respective types for more details.
Issue: SPR-12212
Various parts of the reference manual as well as the Javadoc for
AnnotationConfigContextLoaderUtils improperly refer to "static inner
classes" even though this terminology does not exist in Java. The Java
Language Specification explicitly refers to such classes as "static
nested classes." An "inner class" must be non-static by definition.
- Copyright end date is now dynamic, based on the current year.
- Added missing spaces in front of web link to ASL 2.0 license file.
- Changed @since tag to 4.2.
In order to avoid breaking changed due to the upcoming SockJS 1.0
release (see SPR-12422 for more details) and link to the right
SockJS documentation version, we now explicitly specify that we
support SockJS protocol 0.3.3 and SockJS client 0.3.x.
Update the documentation to better reflect the fact that a @EnableCaching
configuration class must implement CachingConfigurer in order to provide
advanced customizations to the cache abstraction.
Update the developer guide to explicitly reference the (inferred)
constant introduced in 38e90105a0.
Also emphasis the fact that the (inferred) mode is enabled by default
with Java config and how to disable it if necessary.
Issue: SPR-12534
Using the "quotes" substitution group by default leads to side effect
when the "*" character is used. This is especially true for AOP pointcut
or for MVC mappings.
Plain verbatim might work most of the time unless you intend to highlight
a piece of code or a comment.
Issue: SPR-12456
Prior to this commit, finding out how many application contexts had
been loaded within a test suite required the use of reflection and a
bit of hacking.
This commit addresses this issue by logging ContextCache statistics
whenever an application context is loaded by the Spring TestContext
Framework (TCF).
The log output can be enabled by setting the
"org.springframework.test.context.cache" logging category to DEBUG.
Issue: SPR-12409