Harmonize javadoc urls in developer guide
Issue: SPR-13613
This commit is contained in:
parent
400749667a
commit
9bed389d1f
|
|
@ -1169,9 +1169,8 @@ configure(rootProject) {
|
|||
backends = ['docbook']
|
||||
options doctype: 'book', eruby: 'erubis'
|
||||
attributes 'spring-version': project.version,
|
||||
'javadoc-baseurl' : "http://docs.spring.io/spring/docs/current/javadoc-api",
|
||||
revnumber : project.version,
|
||||
docinfo : ""
|
||||
'revnumber' : project.version,
|
||||
'docinfo' : ""
|
||||
}
|
||||
|
||||
reference {
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ FileUtils.cp_r('images','build')
|
|||
guard 'shell' do
|
||||
watch(/^.*\.adoc$/) {|m|
|
||||
if m[0] != "index.adoc"
|
||||
Asciidoctor.render_file(m[0], :to_dir => "build", :safe => Asciidoctor::SafeMode::UNSAFE, :attributes=> {'idprefix' => '', 'idseparator' => '-', 'copycss' => '', 'icons' => 'font', 'source-highlighter' => 'prettify', 'sectanchors' => '', 'doctype' => 'book', 'toc' => 'left', 'toclevels' => '2', 'spring-version' => '4.2.0.BUILD-SNAPSHOT', 'revnumber' => '4.2.0.BUILD-SNAPSHOT', 'javadoc-baseurl' => "http://docs.spring.io/spring/docs/current/javadoc-api" })
|
||||
Asciidoctor.render_file(m[0], :to_dir => "build", :safe => Asciidoctor::SafeMode::UNSAFE, :attributes=> {'idprefix' => '', 'idseparator' => '-', 'copycss' => '', 'icons' => 'font', 'source-highlighter' => 'prettify', 'sectanchors' => '', 'doctype' => 'book', 'toc' => 'left', 'toclevels' => '2', 'spring-version' => '4.2.0.BUILD-SNAPSHOT', 'revnumber' => '4.2.0.BUILD-SNAPSHOT' })
|
||||
end
|
||||
Asciidoctor.render_file("index.adoc", :to_dir => "build", :safe => Asciidoctor::SafeMode::UNSAFE, :attributes=> {'idprefix' => '', 'idseparator' => '-', 'copycss' => '', 'icons' => 'font', 'source-highlighter' => 'prettify', 'sectanchors' => '', 'doctype' => 'book', 'toc' => 'left', 'toclevels' => '1', 'spring-version' => '4.2.0.BUILD-SNAPSHOT', 'revnumber' => '4.2.0.BUILD-SNAPSHOT', 'javadoc-baseurl' => "http://docs.spring.io/spring/docs/current/javadoc-api" })
|
||||
Asciidoctor.render_file("index.adoc", :to_dir => "build", :safe => Asciidoctor::SafeMode::UNSAFE, :attributes=> {'idprefix' => '', 'idseparator' => '-', 'copycss' => '', 'icons' => 'font', 'source-highlighter' => 'prettify', 'sectanchors' => '', 'doctype' => 'book', 'toc' => 'left', 'toclevels' => '1', 'spring-version' => '4.2.0.BUILD-SNAPSHOT', 'revnumber' => '4.2.0.BUILD-SNAPSHOT' })
|
||||
}
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -4,13 +4,13 @@
|
|||
[[migration-4.x]]
|
||||
== Migrating to Spring Framework 4.x
|
||||
Migration guides for upgrading from previous releases of the Spring Framework are now provided as a
|
||||
https://github.com/spring-projects/spring-framework/wiki/Migrating-from-earlier-versions-of-the-spring-framework[Wiki page].
|
||||
{wiki-spring-framework}/Migrating-from-earlier-versions-of-the-spring-framework[Wiki page].
|
||||
|
||||
|
||||
[[annotation-programming-model]]
|
||||
== Spring Annotation Programming Model
|
||||
Spring's annotation programming model is documented in the
|
||||
https://github.com/spring-projects/spring-framework/wiki/Spring-Annotation-Programming-Model[Spring Framework Wiki].
|
||||
{wiki-spring-framework}/Spring-Annotation-Programming-Model[Spring Framework Wiki].
|
||||
|
||||
|
||||
[[classic-spring]]
|
||||
|
|
@ -2209,13 +2209,13 @@ developer's intent (__'inject this constant value'__), and it just reads better.
|
|||
|
||||
[[xsd-config-body-schemas-util-frfb]]
|
||||
====== Setting a bean property or constructor arg from a field value
|
||||
http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/beans/factory/config/FieldRetrievingFactoryBean.html[`FieldRetrievingFactoryBean`]
|
||||
{api-spring-framework}/beans/factory/config/FieldRetrievingFactoryBean.html[`FieldRetrievingFactoryBean`]
|
||||
is a `FactoryBean` which retrieves a `static` or non-static field value. It is typically
|
||||
used for retrieving `public` `static` `final` constants, which may then be used to set a
|
||||
property value or constructor arg for another bean.
|
||||
|
||||
Find below an example which shows how a `static` field is exposed, by using the
|
||||
http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/beans/factory/config/FieldRetrievingFactoryBean.html#setStaticField(java.lang.String)[`staticField`]
|
||||
{api-spring-framework}/beans/factory/config/FieldRetrievingFactoryBean.html#setStaticField(java.lang.String)[`staticField`]
|
||||
property:
|
||||
|
||||
[source,xml,indent=0]
|
||||
|
|
@ -2255,7 +2255,7 @@ to be specified for the bean reference:
|
|||
|
||||
It is also possible to access a non-static (instance) field of another bean, as
|
||||
described in the API documentation for the
|
||||
http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/beans/factory/config/FieldRetrievingFactoryBean.html[`FieldRetrievingFactoryBean`]
|
||||
{api-spring-framework}/beans/factory/config/FieldRetrievingFactoryBean.html[`FieldRetrievingFactoryBean`]
|
||||
class.
|
||||
|
||||
Injecting enum values into beans as either property or constructor arguments is very
|
||||
|
|
|
|||
|
|
@ -17,10 +17,10 @@ construction of classes, or a mechanism such as the __Service Locator__ pattern.
|
|||
|
||||
The `org.springframework.beans` and `org.springframework.context` packages are the basis
|
||||
for Spring Framework's IoC container. The
|
||||
{javadoc-baseurl}/org/springframework/beans/factory/BeanFactory.html[`BeanFactory`]
|
||||
{api-spring-framework}/beans/factory/BeanFactory.html[`BeanFactory`]
|
||||
interface provides an advanced configuration mechanism capable of managing any type of
|
||||
object.
|
||||
{javadoc-baseurl}/org/springframework/context/ApplicationContext.html[`ApplicationContext`]
|
||||
{api-spring-framework}/context/ApplicationContext.html[`ApplicationContext`]
|
||||
is a sub-interface of `BeanFactory`. It adds easier integration with Spring's AOP
|
||||
features; message resource handling (for use in internationalization), event
|
||||
publication; and application-layer specific contexts such as the `WebApplicationContext`
|
||||
|
|
@ -55,8 +55,8 @@ between such objects.
|
|||
Several implementations of the `ApplicationContext` interface are supplied
|
||||
out-of-the-box with Spring. In standalone applications it is common to create an
|
||||
instance of
|
||||
{javadoc-baseurl}/org/springframework/context/support/ClassPathXmlApplicationContext.html[`ClassPathXmlApplicationContext`]
|
||||
or {javadoc-baseurl}/org/springframework/context/support/FileSystemXmlApplicationContext.html[`FileSystemXmlApplicationContext`].
|
||||
{api-spring-framework}/context/support/ClassPathXmlApplicationContext.html[`ClassPathXmlApplicationContext`]
|
||||
or {api-spring-framework}/context/support/FileSystemXmlApplicationContext.html[`FileSystemXmlApplicationContext`].
|
||||
While XML has been the traditional format for defining configuration metadata you can
|
||||
instruct the container to use Java annotations or code as the metadata format by
|
||||
providing a small amount of XML configuration to declaratively enable support for these
|
||||
|
|
@ -2298,7 +2298,7 @@ The following scopes are supported out of the box. You can also create
|
|||
====
|
||||
As of Spring 3.0, a __thread scope__ is available, but is not registered by default. For
|
||||
more information, see the documentation for
|
||||
{javadoc-baseurl}/org/springframework/context/support/SimpleThreadScope.html[`SimpleThreadScope`].
|
||||
{api-spring-framework}/context/support/SimpleThreadScope.html[`SimpleThreadScope`].
|
||||
For instructions on how to register this or any other custom scope, see
|
||||
<<beans-factory-scopes-custom-using>>.
|
||||
====
|
||||
|
|
@ -2712,7 +2712,7 @@ To integrate your custom scope(s) into the Spring container, you need to impleme
|
|||
`org.springframework.beans.factory.config.Scope` interface, which is described in this
|
||||
section. For an idea of how to implement your own scopes, see the `Scope`
|
||||
implementations that are supplied with the Spring Framework itself and the
|
||||
{javadoc-baseurl}/org/springframework/beans/factory/config/Scope.html[`Scope` javadocs],
|
||||
{api-spring-framework}/beans/factory/config/Scope.html[`Scope` javadocs],
|
||||
which explains the methods you need to implement in more detail.
|
||||
|
||||
The `Scope` interface has four methods to get objects from the scope, remove them from
|
||||
|
|
@ -4091,11 +4091,11 @@ configuration (notice the inclusion of the `context` namespace):
|
|||
----
|
||||
|
||||
(The implicitly registered post-processors include
|
||||
{javadoc-baseurl}/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.html[`AutowiredAnnotationBeanPostProcessor`],
|
||||
{javadoc-baseurl}/org/springframework/context/annotation/CommonAnnotationBeanPostProcessor.html[`CommonAnnotationBeanPostProcessor`],
|
||||
{javadoc-baseurl}/org/springframework/orm/jpa/support/PersistenceAnnotationBeanPostProcessor.html[`PersistenceAnnotationBeanPostProcessor`],
|
||||
{api-spring-framework}/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.html[`AutowiredAnnotationBeanPostProcessor`],
|
||||
{api-spring-framework}/context/annotation/CommonAnnotationBeanPostProcessor.html[`CommonAnnotationBeanPostProcessor`],
|
||||
{api-spring-framework}/orm/jpa/support/PersistenceAnnotationBeanPostProcessor.html[`PersistenceAnnotationBeanPostProcessor`],
|
||||
as well as the aforementioned
|
||||
{javadoc-baseurl}/org/springframework/beans/factory/annotation/RequiredAnnotationBeanPostProcessor.html[`RequiredAnnotationBeanPostProcessor`].)
|
||||
{api-spring-framework}/beans/factory/annotation/RequiredAnnotationBeanPostProcessor.html[`RequiredAnnotationBeanPostProcessor`].)
|
||||
|
||||
[NOTE]
|
||||
====
|
||||
|
|
@ -4836,7 +4836,7 @@ Generic qualifiers also apply when autowiring Lists, Maps and Arrays:
|
|||
=== CustomAutowireConfigurer
|
||||
|
||||
The
|
||||
{javadoc-baseurl}/org/springframework/beans/factory/annotation/CustomAutowireConfigurer.html[`CustomAutowireConfigurer`]
|
||||
{api-spring-framework}/beans/factory/annotation/CustomAutowireConfigurer.html[`CustomAutowireConfigurer`]
|
||||
is a `BeanFactoryPostProcessor` that enables you to register your own custom qualifier
|
||||
annotation types even if they are not annotated with Spring's `@Qualifier` annotation.
|
||||
|
||||
|
|
@ -4918,7 +4918,7 @@ name "movieFinder" injected into its setter method:
|
|||
The name provided with the annotation is resolved as a bean name by the
|
||||
`ApplicationContext` of which the `CommonAnnotationBeanPostProcessor` is aware. The
|
||||
names can be resolved through JNDI if you configure Spring's
|
||||
{javadoc-baseurl}/org/springframework/jndi/support/SimpleJndiBeanFactory.html[`SimpleJndiBeanFactory`]
|
||||
{api-spring-framework}/jndi/support/SimpleJndiBeanFactory.html[`SimpleJndiBeanFactory`]
|
||||
explicitly. However, it is recommended that you rely on the default behavior and simply
|
||||
use Spring's JNDI lookup capabilities to preserve the level of indirection.
|
||||
====
|
||||
|
|
@ -5464,7 +5464,7 @@ were detected, the names would be myMovieLister and movieFinderImpl:
|
|||
====
|
||||
If you do not want to rely on the default bean-naming strategy, you can provide a custom
|
||||
bean-naming strategy. First, implement the
|
||||
{javadoc-baseurl}/org/springframework/beans/factory/support/BeanNameGenerator.html[`BeanNameGenerator`]
|
||||
{api-spring-framework}/beans/factory/support/BeanNameGenerator.html[`BeanNameGenerator`]
|
||||
interface, and be sure to include a default no-arg constructor. Then, provide the
|
||||
fully-qualified class name when configuring the scanner:
|
||||
====
|
||||
|
|
@ -5516,7 +5516,7 @@ within the annotation:
|
|||
====
|
||||
To provide a custom strategy for scope resolution rather than relying on the
|
||||
annotation-based approach, implement the
|
||||
{javadoc-baseurl}/org/springframework/context/annotation/ScopeMetadataResolver.html[`ScopeMetadataResolver`]
|
||||
{api-spring-framework}/context/annotation/ScopeMetadataResolver.html[`ScopeMetadataResolver`]
|
||||
interface, and be sure to include a default no-arg constructor. Then, provide the
|
||||
fully-qualified class name when configuring the scanner:
|
||||
====
|
||||
|
|
@ -6373,7 +6373,7 @@ Sometimes it is helpful to provide a more detailed textual description of a bean
|
|||
be particularly useful when beans are exposed (perhaps via JMX) for monitoring purposes.
|
||||
|
||||
To add a description to a `@Bean` the
|
||||
{javadoc-baseurl}/org/springframework/context/annotation/Description.html[`@Description`]
|
||||
{api-spring-framework}/context/annotation/Description.html[`@Description`]
|
||||
annotation can be used:
|
||||
|
||||
[source,java,indent=0]
|
||||
|
|
@ -6837,7 +6837,7 @@ profile has been enabled in the Spring `Environment` (see <<beans-definition-pro
|
|||
for details).
|
||||
|
||||
The `@Profile` annotation is actually implemented using a much more flexible annotation
|
||||
called {javadoc-baseurl}/org/springframework/context/annotation/Conditional.html[`@Conditional`].
|
||||
called {api-spring-framework}/context/annotation/Conditional.html[`@Conditional`].
|
||||
The `@Conditional` annotation indicates specific
|
||||
`org.springframework.context.annotation.Condition` implementations that should be
|
||||
consulted before a `@Bean` is registered.
|
||||
|
|
@ -6867,7 +6867,7 @@ method that returns `true` or `false`. For example, here is the actual
|
|||
}
|
||||
----
|
||||
|
||||
See the {javadoc-baseurl}/org/springframework/context/annotation/Conditional.html[
|
||||
See the {api-spring-framework}/context/annotation/Conditional.html[
|
||||
`@Conditional` javadocs] for more detail.
|
||||
|
||||
[[beans-java-combining]]
|
||||
|
|
@ -7063,7 +7063,7 @@ jdbc.password=
|
|||
[[beans-environment]]
|
||||
== Environment abstraction
|
||||
|
||||
The {javadoc-baseurl}/org/springframework/core/env/Environment.html[`Environment`]
|
||||
The {api-spring-framework}/core/env/Environment.html[`Environment`]
|
||||
is an abstraction integrated in the container that models two key
|
||||
aspects of the application environment: <<beans-definition-profiles,_profiles_>>
|
||||
and <<beans-property-source-abstraction,_properties_>>.
|
||||
|
|
@ -7145,7 +7145,7 @@ this need.
|
|||
[[beans-definition-profiles-java]]
|
||||
==== @Profile
|
||||
|
||||
The {javadoc-baseurl}/org/springframework/context/annotation/Profile.html[`@Profile`]
|
||||
The {api-spring-framework}/context/annotation/Profile.html[`@Profile`]
|
||||
annotation allows you to indicate that a component is eligible for registration
|
||||
when one or more specified profiles are active. Using our example above, we
|
||||
can rewrite the `dataSource` configuration as follows:
|
||||
|
|
@ -7397,9 +7397,9 @@ System.out.println("Does my environment contain the ''foo'' property? " + contai
|
|||
|
||||
In the snippet above, we see a high-level way of asking Spring whether the `foo` property is
|
||||
defined for the current environment. To answer this question, the `Environment` object performs
|
||||
a search over a set of {javadoc-baseurl}/org/springframework/core/env/PropertySource.html[`PropertySource`]
|
||||
a search over a set of {api-spring-framework}/core/env/PropertySource.html[`PropertySource`]
|
||||
objects. A `PropertySource` is a simple abstraction over any source of key-value pairs, and
|
||||
Spring's {javadoc-baseurl}/org/springframework/core/env/StandardEnvironment.html[`StandardEnvironment`]
|
||||
Spring's {api-spring-framework}/core/env/StandardEnvironment.html[`StandardEnvironment`]
|
||||
is configured with two PropertySource objects -- one representing the set of JVM system properties
|
||||
(_a la_ `System.getProperties()`) and one representing the set of system environment variables
|
||||
(_a la_ `System.getenv()`).
|
||||
|
|
@ -7407,11 +7407,11 @@ is configured with two PropertySource objects -- one representing the set of JVM
|
|||
[NOTE]
|
||||
====
|
||||
These default property sources are present for `StandardEnvironment`, for use in standalone
|
||||
applications. {javadoc-baseurl}/org/springframework/web/context/support/StandardServletEnvironment.html[`StandardServletEnvironment`]
|
||||
applications. {api-spring-framework}/web/context/support/StandardServletEnvironment.html[`StandardServletEnvironment`]
|
||||
is populated with additional default property sources including servlet config and servlet
|
||||
context parameters. {javadoc-baseurl}/org/springframework/web/portlet/context/StandardPortletEnvironment.html[`StandardPortletEnvironment`]
|
||||
context parameters. {api-spring-framework}/web/portlet/context/StandardPortletEnvironment.html[`StandardPortletEnvironment`]
|
||||
similarly has access to portlet config and portlet context parameters as property sources.
|
||||
Both can optionally enable a {javadoc-baseurl}/org/springframework/jndi/JndiPropertySource.html[`JndiPropertySource`].
|
||||
Both can optionally enable a {api-spring-framework}/jndi/JndiPropertySource.html[`JndiPropertySource`].
|
||||
See Javadoc for details.
|
||||
====
|
||||
|
||||
|
|
@ -7443,13 +7443,13 @@ sources.addFirst(new MyPropertySource());
|
|||
In the code above, `MyPropertySource` has been added with highest precedence in the
|
||||
search. If it contains a `foo` property, it will be detected and returned ahead of
|
||||
any `foo` property in any other `PropertySource`. The
|
||||
{javadoc-baseurl}/org/springframework/core/env/MutablePropertySources.html[`MutablePropertySources`]
|
||||
{api-spring-framework}/core/env/MutablePropertySources.html[`MutablePropertySources`]
|
||||
API exposes a number of methods that allow for precise manipulation of the set of
|
||||
property sources.
|
||||
|
||||
=== @PropertySource
|
||||
|
||||
The {javadoc-baseurl}/org/springframework/context/annotation/PropertySource.html[`@PropertySource`]
|
||||
The {api-spring-framework}/context/annotation/PropertySource.html[`@PropertySource`]
|
||||
annotation provides a convenient and declarative mechanism for adding a `PropertySource`
|
||||
to Spring's `Environment`.
|
||||
|
||||
|
|
@ -7571,7 +7571,7 @@ AspectJ load-time weaving, see <<aop-aj-ltw>>.
|
|||
As was discussed in the chapter introduction, the `org.springframework.beans.factory`
|
||||
package provides basic functionality for managing and manipulating beans, including in a
|
||||
programmatic way. The `org.springframework.context` package adds the
|
||||
{javadoc-baseurl}/org/springframework/context/ApplicationContext.html[`ApplicationContext`]
|
||||
{api-spring-framework}/context/ApplicationContext.html[`ApplicationContext`]
|
||||
interface, which extends the `BeanFactory` interface, in addition to extending other
|
||||
interfaces to provide additional functionality in a more __application
|
||||
framework-oriented style__. Many people use the `ApplicationContext` in a completely
|
||||
|
|
@ -8249,7 +8249,7 @@ and JMX support facilities. Application components can also interact with the
|
|||
application server's JCA WorkManager through Spring's `TaskExecutor` abstraction.
|
||||
|
||||
Check out the JavaDoc of the
|
||||
{javadoc-baseurl}/org/springframework/jca/context/SpringContextResourceAdapter.html[`SpringContextResourceAdapter`]
|
||||
{api-spring-framework}/jca/context/SpringContextResourceAdapter.html[`SpringContextResourceAdapter`]
|
||||
class for the configuration details involved in RAR deployment.
|
||||
|
||||
__For a simple deployment of a Spring ApplicationContext as a Java EE RAR file:__ package
|
||||
|
|
@ -8402,7 +8402,7 @@ option for accessing shared Spring-managed components, such as in an EJB 2.1
|
|||
environment, or when you want to share a single ApplicationContext as a parent to
|
||||
WebApplicationContexts across WAR files. In this case you should look into using the
|
||||
utility class
|
||||
{javadoc-baseurl}/org/springframework/context/access/ContextSingletonBeanFactoryLocator.html[`ContextSingletonBeanFactoryLocator`]
|
||||
{api-spring-framework}/context/access/ContextSingletonBeanFactoryLocator.html[`ContextSingletonBeanFactoryLocator`]
|
||||
locator that is described in this
|
||||
https://spring.io/blog/2007/06/11/using-a-shared-parent-application-context-in-a-multi-war-spring-application/[Spring
|
||||
team blog entry].
|
||||
|
|
|
|||
|
|
@ -191,9 +191,9 @@ convenience to aid developers in targeting error messages and suchlike.
|
|||
|
||||
More information on the `MessageCodesResolver` and the default strategy can be found
|
||||
online in the javadocs of
|
||||
{javadoc-baseurl}/org/springframework/validation/MessageCodesResolver.html[`MessageCodesResolver`]
|
||||
{api-spring-framework}/validation/MessageCodesResolver.html[`MessageCodesResolver`]
|
||||
and
|
||||
{javadoc-baseurl}/org/springframework/validation/DefaultMessageCodesResolver.html[`DefaultMessageCodesResolver`],
|
||||
{api-spring-framework}/validation/DefaultMessageCodesResolver.html[`DefaultMessageCodesResolver`],
|
||||
respectively.
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -7179,7 +7179,7 @@ unmarshal XML from an external source, set the `supportedClasses` property on th
|
|||
This will make sure that only the registered classes are eligible for unmarshalling.
|
||||
|
||||
Additionally, you can register
|
||||
{javadoc-baseurl}/org/springframework/oxm/xstream/XStreamMarshaller.html#setConverters(com.thoughtworks.xstream.converters.ConverterMatcher...)[custom
|
||||
{api-spring-framework}/oxm/xstream/XStreamMarshaller.html#setConverters(com.thoughtworks.xstream.converters.ConverterMatcher...)[custom
|
||||
converters] to make sure that only your supported classes can be unmarshalled. You might
|
||||
want to add a `CatchAllConverter` as the last converter in the list, in addition to
|
||||
converters that explicitly support the domain classes that should be supported. As a
|
||||
|
|
|
|||
|
|
@ -1,6 +1,16 @@
|
|||
= Spring Framework Reference Documentation
|
||||
Rod Johnson; Juergen Hoeller; Keith Donald; Colin Sampaleanu; Rob Harrop; Thomas Risberg; Alef Arendsen; Darren Davison; Dmitriy Kopylenko; Mark Pollack; Thierry Templier; Erwin Vervaet; Portia Tung; Ben Hale; Adrian Colyer; John Lewis; Costin Leau; Mark Fisher; Sam Brannen; Ramnivas Laddad; Arjen Poutsma; Chris Beams; Tareq Abedrabbo; Andy Clement; Dave Syer; Oliver Gierke; Rossen Stoyanchev; Phillip Webb; Rob Winch; Brian Clozel; Stephane Nicoll; Sebastien Deleuze
|
||||
|
||||
:doc-root: http://docs.spring.io
|
||||
|
||||
:api-spring-framework: {doc-root}/spring-framework/docs/{spring-version}/javadoc-api/org/springframework
|
||||
:wiki-spring-framework: https://github.com/spring-projects/spring-framework/wiki
|
||||
|
||||
:doc-spring-security: {doc-root}/spring-security/site/docs/current/reference
|
||||
:doc-spring-amqp: {doc-root}/spring-amqp/docs/current/reference
|
||||
:doc-spring-boot: {doc-root}/spring-boot/docs/current/reference
|
||||
:doc-spring-gemfire: {doc-root}/spring-gemfire/docs/current/reference
|
||||
|
||||
|
||||
include::overview.adoc[]
|
||||
|
||||
|
|
|
|||
|
|
@ -879,8 +879,8 @@ proxy will take care of forwarding the call to the server-side object via JMS.
|
|||
|
||||
[[remoting-amqp]]
|
||||
=== AMQP
|
||||
Refer to the http://docs.spring.io/spring-amqp/reference/html/amqp.html#remoting[Spring
|
||||
AMQP Reference Document 'Spring Remoting with AMQP' section] for more information.
|
||||
Refer to the {doc-spring-amqp}/html/_reference.html#remoting[Spring AMQP Reference Document
|
||||
'Spring Remoting with AMQP' section] for more information.
|
||||
|
||||
|
||||
|
||||
|
|
@ -1004,33 +1004,33 @@ RestTemplate has an asynchronous counter-part: see <<rest-async-resttemplate>>.
|
|||
| HTTP Method | RestTemplate Method
|
||||
|
||||
| DELETE
|
||||
| {javadoc-baseurl}/org/springframework/web/client/RestTemplate.html#delete(String,%20Object...)[delete]
|
||||
| {api-spring-framework}/web/client/RestTemplate.html#delete(String,%20Object...)[delete]
|
||||
|
||||
| GET
|
||||
| {javadoc-baseurl}/org/springframework/web/client/RestTemplate.html#getForObject(String,%20Class,%20Object...)[getForObject]
|
||||
{javadoc-baseurl}/org/springframework/web/client/RestTemplate.html#getForEntity(String,%20Class,%20Object...)[getForEntity]
|
||||
| {api-spring-framework}/web/client/RestTemplate.html#getForObject(String,%20Class,%20Object...)[getForObject]
|
||||
{api-spring-framework}/web/client/RestTemplate.html#getForEntity(String,%20Class,%20Object...)[getForEntity]
|
||||
|
||||
| HEAD
|
||||
| {javadoc-baseurl}/org/springframework/web/client/RestTemplate.html#headForHeaders(String,%20Object...)[headForHeaders(String
|
||||
| {api-spring-framework}/web/client/RestTemplate.html#headForHeaders(String,%20Object...)[headForHeaders(String
|
||||
url, String... urlVariables)]
|
||||
|
||||
| OPTIONS
|
||||
| {javadoc-baseurl}/org/springframework/web/client/RestTemplate.html#optionsForAllow(String,%20Object...)[optionsForAllow(String
|
||||
| {api-spring-framework}/web/client/RestTemplate.html#optionsForAllow(String,%20Object...)[optionsForAllow(String
|
||||
url, String... urlVariables)]
|
||||
|
||||
| POST
|
||||
| {javadoc-baseurl}/org/springframework/web/client/RestTemplate.html#postForLocation(String,%20Object,%20Object...)[postForLocation(String
|
||||
| {api-spring-framework}/web/client/RestTemplate.html#postForLocation(String,%20Object,%20Object...)[postForLocation(String
|
||||
url, Object request, String... urlVariables)]
|
||||
{javadoc-baseurl}/org/springframework/web/client/RestTemplate.html#postForObject(java.lang.String,%20java.lang.Object,%20java.lang.Class,%20java.lang.String...)[postForObject(String
|
||||
{api-spring-framework}/web/client/RestTemplate.html#postForObject(java.lang.String,%20java.lang.Object,%20java.lang.Class,%20java.lang.String...)[postForObject(String
|
||||
url, Object request, Class<T> responseType, String... uriVariables)]
|
||||
|
||||
| PUT
|
||||
| {javadoc-baseurl}/org/springframework/web/client/RestTemplate.html#put(String,%20Object,%20Object...)[put(String
|
||||
| {api-spring-framework}/web/client/RestTemplate.html#put(String,%20Object,%20Object...)[put(String
|
||||
url, Object request, String...urlVariables)]
|
||||
|
||||
| PATCH and others
|
||||
| {javadoc-baseurl}/org/springframework/web/client/RestTemplate.html#exchange(java.lang.String,%20org.springframework.http.HttpMethod,%20org.springframework.http.HttpEntity,%20java.lang.Class,%20java.lang.Object...)[exchange]
|
||||
{javadoc-baseurl}/org/springframework/web/client/RestTemplate.html#execute(java.lang.String,%20org.springframework.http.HttpMethod,%20org.springframework.web.client.RequestCallback,%20org.springframework.web.client.ResponseExtractor,%20java.lang.Object...)[execute]
|
||||
| {api-spring-framework}/web/client/RestTemplate.html#exchange(java.lang.String,%20org.springframework.http.HttpMethod,%20org.springframework.http.HttpEntity,%20java.lang.Class,%20java.lang.Object...)[exchange]
|
||||
{api-spring-framework}/web/client/RestTemplate.html#execute(java.lang.String,%20org.springframework.http.HttpMethod,%20org.springframework.web.client.RequestCallback,%20org.springframework.web.client.ResponseExtractor,%20java.lang.Object...)[execute]
|
||||
|===
|
||||
|
||||
The names of `RestTemplate` methods follow a naming convention, the first part indicates
|
||||
|
|
@ -1374,7 +1374,7 @@ needs: multiple threads may be blocked, waiting for remote HTTP responses.
|
|||
`AsyncRestTemplate` and <<rest-resttemplate>>'s APIs are very similar; see
|
||||
<<rest-overview-of-resttemplate-methods-tbl>>. The main difference between those APIs is
|
||||
that `AsyncRestTemplate` returns
|
||||
{javadoc-baseurl}/org/springframework/util/concurrent/ListenableFuture.html[`ListenableFuture`]
|
||||
{api-spring-framework}/util/concurrent/ListenableFuture.html[`ListenableFuture`]
|
||||
wrappers as opposed to concrete results.
|
||||
|
||||
The previous `RestTemplate` example translates to:
|
||||
|
|
@ -1390,7 +1390,7 @@ The previous `RestTemplate` example translates to:
|
|||
ResponseEntity<String> entity = futureEntity.get();
|
||||
----
|
||||
|
||||
{javadoc-baseurl}/org/springframework/util/concurrent/ListenableFuture.html[`ListenableFuture`]
|
||||
{api-spring-framework}/util/concurrent/ListenableFuture.html[`ListenableFuture`]
|
||||
accepts completion callbacks:
|
||||
|
||||
[source,java,indent=0]
|
||||
|
|
@ -1416,18 +1416,18 @@ accepts completion callbacks:
|
|||
[NOTE]
|
||||
====
|
||||
The default `AsyncRestTemplate` constructor registers a
|
||||
{javadoc-baseurl}/org/springframework/core/task/SimpleAsyncTaskExecutor.html[`SimpleAsyncTaskExecutor`
|
||||
{api-spring-framework}/core/task/SimpleAsyncTaskExecutor.html[`SimpleAsyncTaskExecutor`
|
||||
] for executing HTTP requests.
|
||||
When dealing with a large number of short-lived requests, a thread-pooling TaskExecutor
|
||||
implementation like
|
||||
{javadoc-baseurl}/org/springframework/scheduling/concurrent/ThreadPoolTaskExecutor.html[`ThreadPoolTaskExecutor`]
|
||||
{api-spring-framework}/scheduling/concurrent/ThreadPoolTaskExecutor.html[`ThreadPoolTaskExecutor`]
|
||||
may be a good choice.
|
||||
====
|
||||
|
||||
See the
|
||||
{javadoc-baseurl}/org/springframework/util/concurrent/ListenableFuture.html[`ListenableFuture` javadocs]
|
||||
{api-spring-framework}/util/concurrent/ListenableFuture.html[`ListenableFuture` javadocs]
|
||||
and
|
||||
{javadoc-baseurl}/org/springframework/web/client/AsyncRestTemplate.html[`AsyncRestTemplate` javadocs]
|
||||
{api-spring-framework}/web/client/AsyncRestTemplate.html[`AsyncRestTemplate` javadocs]
|
||||
for more details.
|
||||
|
||||
|
||||
|
|
@ -7047,7 +7047,7 @@ seconds and one every morning at 6 AM. To finalize everything, we need to set up
|
|||
More properties are available for the `SchedulerFactoryBean` for you to set, such as the
|
||||
calendars used by the job details, properties to customize Quartz with, etc. Have a look
|
||||
at the
|
||||
{javadoc-baseurl}/org/springframework/scheduling/quartz/SchedulerFactoryBean.html[`SchedulerFactoryBean`
|
||||
{api-spring-framework}/scheduling/quartz/SchedulerFactoryBean.html[`SchedulerFactoryBean`
|
||||
javadocs] for more information.
|
||||
|
||||
|
||||
|
|
@ -8643,7 +8643,7 @@ application through AOP. The configuration is intentionally similar with that of
|
|||
[NOTE]
|
||||
====
|
||||
Advanced customizations using Java config require to implement `CachingConfigurer`, refer
|
||||
to {javadoc-baseurl}/org/springframework/cache/annotation/CachingConfigurer.html[the
|
||||
to {api-spring-framework}/cache/annotation/CachingConfigurer.html[the
|
||||
javadoc for more details].
|
||||
====
|
||||
|
||||
|
|
@ -9096,8 +9096,7 @@ GemFire is a memory-oriented/disk-backed, elastically scalable, continuously ava
|
|||
active (with built-in pattern-based subscription notifications), globally replicated
|
||||
database and provides fully-featured edge caching. For further information on how to use
|
||||
GemFire as a CacheManager (and more), please refer to the
|
||||
http://docs.spring.io/spring-gemfire/docs/current/reference/htmlsingle/[Spring Data GemFire
|
||||
reference documentation].
|
||||
{doc-spring-gemfire}/html/[Spring Data GemFire reference documentation].
|
||||
|
||||
[[cache-store-configuration-jsr107]]
|
||||
==== JSR-107 Cache
|
||||
|
|
|
|||
|
|
@ -3760,7 +3760,7 @@ instrumenting your test class with a `TestContextManager`. See the source code o
|
|||
The __Spring MVC Test framework__ provides first class support for testing Spring MVC
|
||||
code using a fluent API that can be used with JUnit, TestNG, or any other testing
|
||||
framework. It's built on the
|
||||
http://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/mock/web/package-summary.html[Servlet API mock objects]
|
||||
{api-spring-framework}/mock/web/package-summary.html[Servlet API mock objects]
|
||||
from the `spring-test` module and hence does _not_ use a running Servlet container. It
|
||||
uses the `DispatcherServlet` to provide full Spring MVC runtime behavior and provides support
|
||||
for loading actual Spring configuration with the __TestContext framework__ in addition to a
|
||||
|
|
@ -3774,7 +3774,7 @@ use a running server.
|
|||
====
|
||||
Spring Boot provides an option to write full, end-to-end integration tests that include
|
||||
a running server. If this is your goal please have a look at the
|
||||
http://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-testing.html#boot-features-testing-spring-boot-applications[Spring Boot reference page].
|
||||
{doc-spring-boot}/html/boot-features-testing.html#boot-features-testing-spring-boot-applications[Spring Boot reference page].
|
||||
For more information on the differences between out-of-container and end-to-end
|
||||
integration tests, see <<spring-mvc-test-vs-end-to-end-integration-tests>>.
|
||||
====
|
||||
|
|
@ -4181,7 +4181,7 @@ body as expected. The same is true for rendering JSON, XML, and other formats vi
|
|||
|
||||
Alternatively you may consider the full end-to-end integration testing support from
|
||||
Spring Boot via `@WebIntegrationTest`. See the
|
||||
http://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-testing.html#boot-features-testing-spring-boot-applications[Spring Boot reference].
|
||||
{doc-spring-boot}/html/boot-features-testing.html#boot-features-testing-spring-boot-applications[Spring Boot reference].
|
||||
|
||||
There are pros and cons for each approach. The options provided in __Spring MVC Test__
|
||||
are different stops on the scale from classic unit testing to full integration testing.
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ As of Spring Framework 4.2, CORS is supported out of the box. CORS requests
|
|||
(https://github.com/spring-projects/spring-framework/blob/master/spring-webmvc/src/main/java/org/springframework/web/servlet/FrameworkServlet.java#L906[including preflight ones with an `OPTIONS` method])
|
||||
are automatically dispatched to the various registered ++HandlerMapping++s. They handle
|
||||
CORS preflight requests and intercept CORS simple and actual requests thanks to a
|
||||
http://docs.spring.io/spring/docs/4.2.x/javadoc-api/org/springframework/web/cors/CorsProcessor.html[CorsProcessor]
|
||||
{api-spring-framework}/web/cors/CorsProcessor.html[CorsProcessor]
|
||||
implementation (https://github.com/spring-projects/spring-framework/blob/master/spring-web/src/main/java/org/springframework/web/cors/DefaultCorsProcessor.java[DefaultCorsProcessor]
|
||||
by default) in order to add the relevant CORS response headers (like `Access-Control-Allow-Origin`)
|
||||
based on the CORS configuration you have provided.
|
||||
|
|
@ -34,7 +34,7 @@ Since CORS requests are automatically dispatched, you *do not need* to change th
|
|||
== Controller method CORS configuration
|
||||
|
||||
You can add an
|
||||
http://docs.spring.io/spring/docs/4.2.x/javadoc-api/org/springframework/web/bind/annotation/CrossOrigin.html[`@CrossOrigin`]
|
||||
{api-spring-framework}/web/bind/annotation/CrossOrigin.html[`@CrossOrigin`]
|
||||
annotation to your `@RequestMapping` annotated handler method in order to enable CORS on
|
||||
it. By default `@CrossOrigin` allows all origins and the HTTP methods specified in the
|
||||
`@RequestMapping` annotation:
|
||||
|
|
@ -191,16 +191,16 @@ It is also possible to declare several CORS mappings with customized properties:
|
|||
|
||||
== Advanced Customization
|
||||
|
||||
http://docs.spring.io/spring/docs/4.2.x/javadoc-api/org/springframework/web/cors/CorsConfiguration.html[CorsConfiguration]
|
||||
{api-spring-framework}/web/cors/CorsConfiguration.html[CorsConfiguration]
|
||||
allows you to specify how the CORS requests should be processed: allowed origins, headers, methods, etc.
|
||||
It can be provided in various ways:
|
||||
|
||||
* http://docs.spring.io/spring/docs/4.2.x/javadoc-api/org/springframework/web/servlet/handler/AbstractHandlerMapping.html#setCorsConfiguration-java.util.Map-[`AbstractHandlerMapping#setCorsConfiguration()`]
|
||||
allows to specify a `Map` with several http://docs.spring.io/spring/docs/4.2.x/javadoc-api/org/springframework/web/cors/CorsConfiguration.html[CorsConfiguration]
|
||||
* {api-spring-framework}/web/servlet/handler/AbstractHandlerMapping.html#setCorsConfiguration-java.util.Map-[`AbstractHandlerMapping#setCorsConfiguration()`]
|
||||
allows to specify a `Map` with several {api-spring-framework}/web/cors/CorsConfiguration.html[CorsConfiguration]
|
||||
instances mapped to path patterns like `/api/**`.
|
||||
* Subclasses can provide their own `CorsConfiguration` by overriding the
|
||||
`AbstractHandlerMapping#getCorsConfiguration(Object, HttpServletRequest)` method.
|
||||
* Handlers can implement the http://docs.spring.io/spring/docs/4.2.x/javadoc-api/org/springframework/web/cors/CorsConfigurationSource.html[`CorsConfigurationSource`]
|
||||
* Handlers can implement the {api-spring-framework}/web/cors/CorsConfigurationSource.html[`CorsConfigurationSource`]
|
||||
interface (like https://github.com/spring-projects/spring-framework/blob/master/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceHttpRequestHandler.java[`ResourceHttpRequestHandler`]
|
||||
now does) in order to provide a http://docs.spring.io/spring/docs/4.2.x/javadoc-api/org/springframework/web/cors/CorsConfiguration.html[CorsConfiguration]
|
||||
now does) in order to provide a {api-spring-framework}/web/cors/CorsConfiguration.html[CorsConfiguration]
|
||||
instance for each request.
|
||||
|
|
@ -83,7 +83,7 @@ context'). This section details how one configures a Spring container (a
|
|||
`WebApplicationContext`) that contains all of the 'business beans' in one's application.
|
||||
|
||||
On to specifics: all that one need do is to declare a
|
||||
{javadoc-baseurl}/org/springframework/web/context/ContextLoaderListener.html[`ContextLoaderListener`]
|
||||
{api-spring-framework}/web/context/ContextLoaderListener.html[`ContextLoaderListener`]
|
||||
in the standard Java EE servlet `web.xml` file of one's web application, and add a
|
||||
`contextConfigLocation`<context-param/> section (in the same file) that defines which
|
||||
set of Spring XML configuration files to load.
|
||||
|
|
@ -112,7 +112,7 @@ Find below the <context-param/> configuration:
|
|||
If you don't specify the `contextConfigLocation` context parameter, the
|
||||
`ContextLoaderListener` will look for a file called `/WEB-INF/applicationContext.xml` to
|
||||
load. Once the context files are loaded, Spring creates a
|
||||
{javadoc-baseurl}/org/springframework/web/context/WebApplicationContext.html[`WebApplicationContext`]
|
||||
{api-spring-framework}/web/context/WebApplicationContext.html[`WebApplicationContext`]
|
||||
object based on the bean definitions and stores it in the `ServletContext` of the web
|
||||
application.
|
||||
|
||||
|
|
@ -127,7 +127,7 @@ created by the `ContextLoaderListener`.
|
|||
----
|
||||
|
||||
The
|
||||
{javadoc-baseurl}/org/springframework/web/context/support/WebApplicationContextUtils.html[`WebApplicationContextUtils`]
|
||||
{api-spring-framework}/web/context/support/WebApplicationContextUtils.html[`WebApplicationContextUtils`]
|
||||
class is for convenience, so you don't have to remember the name of the `ServletContext`
|
||||
attribute. Its __getWebApplicationContext()__ method will return `null` if an object
|
||||
doesn't exist under the `WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE`
|
||||
|
|
@ -194,7 +194,7 @@ __faces-context.xml__ file:
|
|||
=== FacesContextUtils
|
||||
A custom `VariableResolver` works well when mapping one's properties to beans
|
||||
in __faces-config.xml__, but at times one may need to grab a bean explicitly. The
|
||||
{javadoc-baseurl}/org/springframework/web/jsf/FacesContextUtils.html[`FacesContextUtils`]
|
||||
{api-spring-framework}/web/jsf/FacesContextUtils.html[`FacesContextUtils`]
|
||||
class makes this easy. It is similar to `WebApplicationContextUtils`, except that it
|
||||
takes a `FacesContext` parameter rather than a `ServletContext` parameter.
|
||||
|
||||
|
|
|
|||
|
|
@ -1425,7 +1425,7 @@ JSON, XML or custom MediaType content. For convenience, instead of annotating al
|
|||
`@RequestMapping` methods with `@ResponseBody`, you can annotate your Controller Class
|
||||
with `@RestController`.
|
||||
|
||||
{javadoc-baseurl}/org/springframework/web/bind/annotation/RestController.html[`@RestController`]
|
||||
{api-spring-framework}/web/bind/annotation/RestController.html[`@RestController`]
|
||||
is a stereotype annotation that combines `@ResponseBody` and `@Controller`. More than
|
||||
that, it gives more meaning to your Controller and also may carry additional semantics
|
||||
in future releases of the framework.
|
||||
|
|
@ -1941,7 +1941,7 @@ attributes:
|
|||
----
|
||||
|
||||
Check out the
|
||||
{javadoc-baseurl}/org/springframework/web/bind/annotation/ControllerAdvice.html[`@ControllerAdvice`
|
||||
{api-spring-framework}/web/bind/annotation/ControllerAdvice.html[`@ControllerAdvice`
|
||||
documentation] for more details.
|
||||
|
||||
[[mvc-ann-jsonview]]
|
||||
|
|
@ -3872,9 +3872,9 @@ or in a JSP:
|
|||
|
||||
The http://projects.spring.io/spring-security/[Spring Security] project provides features
|
||||
to protect web applications from malicious exploits. Check out the reference documentation in the sections on
|
||||
http://docs.spring.io/spring-security/site/docs/current/reference/htmlsingle/#csrf["CSRF protection"],
|
||||
http://docs.spring.io/spring-security/site/docs/current/reference/htmlsingle/#headers["Security Response Headers"], and also
|
||||
http://docs.spring.io/spring-security/site/docs/current/reference/htmlsingle/#mvc["Spring MVC Integration"].
|
||||
{doc-spring-security}/htmlsingle/#csrf["CSRF protection"],
|
||||
{doc-spring-security}/htmlsingle/#headers["Security Response Headers"], and also
|
||||
{doc-spring-security}/htmlsingle/#mvc["Spring MVC Integration"].
|
||||
Note that using Spring Security to secure the application is not necessarily required for all features.
|
||||
For example CSRF protection can be added simply by adding the `CsrfFilter` and
|
||||
`CsrfRequestDataValueProcessor` to your configuration. See the
|
||||
|
|
@ -4161,7 +4161,7 @@ Spring Web MVC uses a configuration convention in several of its APIs:
|
|||
* An `n > 0` value will cache the given response for `n` seconds using the
|
||||
`'Cache-Control: max-age=n'` directive.
|
||||
|
||||
The {javadoc-baseurl}/org/springframework/http/CacheControl.html[`CacheControl`] builder
|
||||
The {api-spring-framework}/http/CacheControl.html[`CacheControl`] builder
|
||||
class simply describes the available "Cache-Control" directives and makes it easier to
|
||||
build your own HTTP caching strategy. Once built, a `CacheControl` instance can then be
|
||||
accepted as an argument in several Spring Web MVC APIs.
|
||||
|
|
@ -4572,7 +4572,7 @@ default converters.
|
|||
[NOTE]
|
||||
====
|
||||
Jackson JSON and XML converters are created using `ObjectMapper` instances created by
|
||||
{javadoc-baseurl}/org/springframework/http/converter/json/Jackson2ObjectMapperBuilder.html[`Jackson2ObjectMapperBuilder`]
|
||||
{api-spring-framework}/http/converter/json/Jackson2ObjectMapperBuilder.html[`Jackson2ObjectMapperBuilder`]
|
||||
in order to provide a better default configuration.
|
||||
|
||||
This builder customizes Jackson's default properties with the following ones:
|
||||
|
|
@ -4834,7 +4834,7 @@ corresponding dependencies such as Jackson, JAXB2, or Rome are present on the cl
|
|||
Additional extensions may be not need to be registered explicitly if they can be
|
||||
discovered via `ServletContext.getMimeType(String)` or the __Java Activation Framework__
|
||||
(see `javax.activation.MimetypesFileTypeMap`). You can register more extensions with the
|
||||
{javadoc-baseurl}/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerMapping.html#setUseRegisteredSuffixPatternMatch(boolean)[setUseRegisteredSuffixPatternMatch
|
||||
{api-spring-framework}/web/servlet/mvc/method/annotation/RequestMappingHandlerMapping.html#setUseRegisteredSuffixPatternMatch(boolean)[setUseRegisteredSuffixPatternMatch
|
||||
method].
|
||||
|
||||
The introduction of `ContentNegotiationManager` also enables selective suffix pattern
|
||||
|
|
@ -5267,7 +5267,7 @@ Or in XML:
|
|||
=== Path Matching
|
||||
This allows customizing various settings related to URL mapping and path matching.
|
||||
For details on the individual options check out the
|
||||
{javadoc-baseurl}/org/springframework/web/servlet/config/annotation/PathMatchConfigurer.html[PathMatchConfigurer] API.
|
||||
{api-spring-framework}/web/servlet/config/annotation/PathMatchConfigurer.html[PathMatchConfigurer] API.
|
||||
|
||||
Below is an example in Java config:
|
||||
|
||||
|
|
@ -5325,9 +5325,9 @@ And the same in XML, use the `<mvc:path-matching>` element:
|
|||
=== Message Converters
|
||||
|
||||
Customization of `HttpMessageConverter` can be achieved in Java config by overriding
|
||||
{javadoc-baseurl}/org/springframework/web/servlet/config/annotation/WebMvcConfigurerAdapter.html#configureMessageConverters-java.util.List-[`configureMessageConverters()`]
|
||||
{api-spring-framework}/web/servlet/config/annotation/WebMvcConfigurerAdapter.html#configureMessageConverters-java.util.List-[`configureMessageConverters()`]
|
||||
if you want to replace the default converters created by Spring MVC, or by overriding
|
||||
{javadoc-baseurl}/org/springframework/web/servlet/config/annotation/WebMvcConfigurerAdapter.html#extendMessageConverters-java.util.List-[`extendMessageConverters()`]
|
||||
{api-spring-framework}/web/servlet/config/annotation/WebMvcConfigurerAdapter.html#extendMessageConverters-java.util.List-[`extendMessageConverters()`]
|
||||
if you just want to customize them or add additional converters to the default ones.
|
||||
|
||||
Below is an example that adds Jackson JSON and XML converters with a customized
|
||||
|
|
|
|||
|
|
@ -233,7 +233,7 @@ inline properties.
|
|||
----
|
||||
|
||||
Refer to the
|
||||
{javadoc-baseurl}/org/springframework/ui/velocity/VelocityEngineFactory.html[API
|
||||
{api-spring-framework}/ui/velocity/VelocityEngineFactory.html[API
|
||||
documentation] for Spring configuration of Velocity, or the Velocity documentation for
|
||||
examples and definitions of the `'velocity.properties'` file itself.
|
||||
|
||||
|
|
|
|||
|
|
@ -266,7 +266,7 @@ The above is for use in Spring MVC applications and should be included in the
|
|||
configuration of a <<mvc-servlet,DispatcherServlet>>. However, Spring's WebSocket
|
||||
support does not depend on Spring MVC. It is relatively simple to integrate a `WebSocketHandler`
|
||||
into other HTTP serving environments with the help of
|
||||
{javadoc-baseurl}/org/springframework/web/socket/server/support/WebSocketHttpRequestHandler.html[WebSocketHttpRequestHandler].
|
||||
{api-spring-framework}/web/socket/server/support/WebSocketHttpRequestHandler.html[WebSocketHttpRequestHandler].
|
||||
|
||||
|
||||
|
||||
|
|
@ -734,7 +734,7 @@ The above is for use in Spring MVC applications and should be included in the
|
|||
configuration of a <<mvc-servlet,DispatcherServlet>>. However, Spring's WebSocket
|
||||
and SockJS support does not depend on Spring MVC. It is relatively simple to
|
||||
integrate into other HTTP serving environments with the help of
|
||||
{javadoc-baseurl}/org/springframework/web/socket/sockjs/support/SockJsHttpRequestHandler.html[SockJsHttpRequestHandler].
|
||||
{api-spring-framework}/web/socket/sockjs/support/SockJsHttpRequestHandler.html[SockJsHttpRequestHandler].
|
||||
|
||||
On the browser side, applications can use the
|
||||
https://github.com/sockjs/sockjs-client/[sockjs-client] (version 1.0.x) that
|
||||
|
|
@ -782,7 +782,7 @@ response. By default the Spring Security Java config sets it to `DENY`.
|
|||
In 3.2 the Spring Security XML namespace does not set that header by default
|
||||
but may be configured to do so, and in the future it may set it by default.
|
||||
|
||||
See http://docs.spring.io/spring-security/site/docs/3.2.2.RELEASE/reference/htmlsingle/#headers[Section 7.1. "Default Security Headers"]
|
||||
See {doc-spring-security}/htmlsingle/#headers[Section 7.1. "Default Security Headers"]
|
||||
of the Spring Security documentation for details on how to configure the
|
||||
setting of the `X-Frame-Options` header. You may also check or watch
|
||||
https://jira.spring.io/browse/SEC-2501[SEC-2501] for additional background.
|
||||
|
|
@ -1217,15 +1217,15 @@ It contains a number of abstractions that originated in the
|
|||
https://spring.io/spring-integration[Spring Integration] project and are intended
|
||||
for use as building blocks in messaging applications:
|
||||
|
||||
* {javadoc-baseurl}/org/springframework/messaging/Message.html[Message] --
|
||||
* {api-spring-framework}/messaging/Message.html[Message] --
|
||||
a message with headers and a payload.
|
||||
* {javadoc-baseurl}/org/springframework/messaging/MessageHandler.html[MessageHandler] --
|
||||
* {api-spring-framework}/messaging/MessageHandler.html[MessageHandler] --
|
||||
a contract for handling a message.
|
||||
* {javadoc-baseurl}/org/springframework/messaging/MessageChannel.html[MessageChannel] --
|
||||
* {api-spring-framework}/messaging/MessageChannel.html[MessageChannel] --
|
||||
a contract for sending a message enabling loose coupling between senders and receivers.
|
||||
* {javadoc-baseurl}/org/springframework/messaging/SubscribableChannel.html[SubscribableChannel] --
|
||||
* {api-spring-framework}/messaging/SubscribableChannel.html[SubscribableChannel] --
|
||||
extends `MessageChannel` and sends messages to registered `MessageHandler` subscribers.
|
||||
* {javadoc-baseurl}/org/springframework/messaging/support/ExecutorSubscribableChannel.html[ExecutorSubscribableChannel] --
|
||||
* {api-spring-framework}/messaging/support/ExecutorSubscribableChannel.html[ExecutorSubscribableChannel] --
|
||||
a concrete implementation of `SubscribableChannel` that can deliver messages
|
||||
asynchronously via a thread pool.
|
||||
|
||||
|
|
@ -1502,7 +1502,7 @@ XML configuration equivalent:
|
|||
----
|
||||
|
||||
The "STOMP broker relay" in the above configuration is a Spring
|
||||
http://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/messaging/MessageHandler.html[MessageHandler]
|
||||
{api-spring-framework}/messaging/MessageHandler.html[MessageHandler]
|
||||
that handles messages by forwarding them to an external message broker.
|
||||
To do so it establishes TCP connections to the broker, forwards all
|
||||
messages to it, and then forwards all messages received
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@ support Java 8 features. You can still use Spring with older versions of Java, h
|
|||
the minimum requirement has now been raised to Java SE 6. We have also taken the
|
||||
opportunity of a major release to remove many deprecated classes and methods.
|
||||
|
||||
A https://github.com/spring-projects/spring-framework/wiki/Migrating-from-earlier-versions-of-the-spring-framework[migration guide for upgrading to Spring 4.0]
|
||||
is available on the https://github.com/spring-projects/spring-framework/wiki[Spring Framework GitHub Wiki].
|
||||
A {wiki-spring-framework}/Migrating-from-earlier-versions-of-the-spring-framework[migration guide for upgrading to Spring 4.0]
|
||||
is available on the {wiki-spring-framework}[Spring Framework GitHub Wiki].
|
||||
|
||||
|
||||
|
||||
|
|
@ -127,7 +127,7 @@ directly in your bootstrap code. For example:
|
|||
----
|
||||
|
||||
For more information consult the `GroovyBeanDefinitionReader`
|
||||
{javadoc-baseurl}/org/springframework/beans/factory/groovy/GroovyBeanDefinitionReader.html[javadocs].
|
||||
{api-spring-framework}/beans/factory/groovy/GroovyBeanDefinitionReader.html[javadocs].
|
||||
|
||||
|
||||
|
||||
|
|
@ -232,13 +232,13 @@ Framework 4.0 introduces several new features for use in unit and integration te
|
|||
=== JMS Improvements
|
||||
Spring 4.1 introduces a much simpler infrastructure <<jms-annotated,to register JMS
|
||||
listener endpoints>> by annotating bean methods with
|
||||
{javadoc-baseurl}/org/springframework/jms/annotation/JmsListener.html[`@JmsListener`].
|
||||
{api-spring-framework}/jms/annotation/JmsListener.html[`@JmsListener`].
|
||||
The XML namespace has been enhanced to support this new style (`jms:annotation-driven`),
|
||||
and it is also possible to fully configure the infrastructure using Java config
|
||||
({javadoc-baseurl}/org/springframework/jms/annotation/EnableJms.html[`@EnableJms`],
|
||||
({api-spring-framework}/jms/annotation/EnableJms.html[`@EnableJms`],
|
||||
`JmsListenerContainerFactory`). It is also possible to register listener endpoints
|
||||
programmatically using
|
||||
{javadoc-baseurl}/org/springframework/jms/annotation/JmsListenerConfigurer.html[`JmsListenerConfigurer`].
|
||||
{api-spring-framework}/jms/annotation/JmsListenerConfigurer.html[`JmsListenerConfigurer`].
|
||||
|
||||
Spring 4.1 also aligns its JMS support to allow you to benefit from the `spring-messaging`
|
||||
abstraction introduced in 4.0, that is:
|
||||
|
|
@ -247,7 +247,7 @@ abstraction introduced in 4.0, that is:
|
|||
standard messaging annotations such as `@Payload`, `@Header`, `@Headers`, and `@SendTo`. It
|
||||
is also possible to use a standard `Message` in lieu of `javax.jms.Message` as method
|
||||
argument.
|
||||
* A new {javadoc-baseurl}/org/springframework/jms/core/JmsMessageOperations.html[`JmsMessageOperations`]
|
||||
* A new {api-spring-framework}/jms/core/JmsMessageOperations.html[`JmsMessageOperations`]
|
||||
interface is available and permits `JmsTemplate` like operations using the `Message`
|
||||
abstraction.
|
||||
|
||||
|
|
@ -256,7 +256,7 @@ Finally, Spring 4.1 provides additional miscellaneous improvements:
|
|||
* Synchronous request-reply operations support in `JmsTemplate`
|
||||
* Listener priority can be specified per `<jms:listener/>` element
|
||||
* Recovery options for the message listener container are configurable using a
|
||||
{javadoc-baseurl}/org/springframework/util/backoff/BackOff.html[`BackOff`] implementation
|
||||
{api-spring-framework}/util/backoff/BackOff.html[`BackOff`] implementation
|
||||
* JMS 2.0 shared consumers are supported
|
||||
|
||||
=== Caching Improvements
|
||||
|
|
|
|||
Loading…
Reference in New Issue