Extract recurring asciidoc links to attributes, cleanup old doc files
This commit extract spring-related links and recurring external links into asciidoctor attributes to be used by the Antora toolchain. It notably homogenizes links to: - IETF RFCs - Java Community Process JSRs - the Java API Documentation (on the Java 17 version) - Kotlin documentations (on the Kotlinlang.org version) - the Spring Boot reference guide (on the `html` version) This commit also reworks most link attributes to follow a Project-Category-Misc syntax. For example, `spring-boot-docs` rather than `docs-spring-boot`. Finally, it makes an effort to clean up remainders from the previous documentation toolchain, namely the `docs/asciidoc` folder and `modules/ROOT/pages/attributes.adoc` file. Closes gh-26864 Closes gh-31619
This commit is contained in:
@@ -84,7 +84,7 @@ See xref:web/webmvc/mvc-caching.adoc[HTTP Caching].
|
||||
|
||||
This filter has a `writeWeakETag` parameter that configures the filter to write weak ETags
|
||||
similar to the following: `W/"02a2d595e6ed9a0b24f027f2b63b134d6"` (as defined in
|
||||
https://tools.ietf.org/html/rfc7232#section-2.3[RFC 7232 Section 2.3]).
|
||||
{rfc-site}/rfc7232#section-2.3[RFC 7232 Section 2.3]).
|
||||
|
||||
In order to support xref:web/webmvc/mvc-ann-async.adoc[asynchronous requests] this filter must be mapped
|
||||
with `DispatcherType.ASYNC` so that the filter can delay and successfully generate an
|
||||
|
||||
@@ -137,7 +137,7 @@ Here is a very concise overview of Servlet asynchronous request processing:
|
||||
asynchronously produced return value from the `Callable`.
|
||||
|
||||
For further background and context, you can also read
|
||||
https://spring.io/blog/2012/05/07/spring-mvc-3-2-preview-introducing-servlet-3-async-support[the
|
||||
{spring-site-blog}/2012/05/07/spring-mvc-3-2-preview-introducing-servlet-3-async-support[the
|
||||
blog posts] that introduced asynchronous request processing support in Spring MVC 3.2.
|
||||
|
||||
|
||||
@@ -165,11 +165,11 @@ processing (instead of `postHandle` and `afterCompletion`).
|
||||
`HandlerInterceptor` implementations can also register a `CallableProcessingInterceptor`
|
||||
or a `DeferredResultProcessingInterceptor`, to integrate more deeply with the
|
||||
lifecycle of an asynchronous request (for example, to handle a timeout event). See
|
||||
{api-spring-framework}/web/servlet/AsyncHandlerInterceptor.html[`AsyncHandlerInterceptor`]
|
||||
{spring-framework-api}/web/servlet/AsyncHandlerInterceptor.html[`AsyncHandlerInterceptor`]
|
||||
for more details.
|
||||
|
||||
`DeferredResult` provides `onTimeout(Runnable)` and `onCompletion(Runnable)` callbacks.
|
||||
See the {api-spring-framework}/web/context/request/async/DeferredResult.html[javadoc of `DeferredResult`]
|
||||
See the {spring-framework-api}/web/context/request/async/DeferredResult.html[javadoc of `DeferredResult`]
|
||||
for more details. `Callable` can be substituted for `WebAsyncTask` that exposes additional
|
||||
methods for timeout and completion callbacks.
|
||||
|
||||
@@ -399,7 +399,7 @@ Applications can also return `Flux<ServerSentEvent>` or `Observable<ServerSentEv
|
||||
to, similar to using `DeferredResult<List<?>>`.
|
||||
|
||||
TIP: Spring MVC supports Reactor and RxJava through the
|
||||
{api-spring-framework}/core/ReactiveAdapterRegistry.html[`ReactiveAdapterRegistry`] from
|
||||
{spring-framework-api}/core/ReactiveAdapterRegistry.html[`ReactiveAdapterRegistry`] from
|
||||
`spring-core`, which lets it adapt from multiple reactive libraries.
|
||||
|
||||
For streaming to the response, reactive back pressure is supported, but writes to the
|
||||
@@ -420,7 +420,7 @@ across multiple threads. The Micrometer
|
||||
https://github.com/micrometer-metrics/context-propagation#context-propagation-library[Context Propagation]
|
||||
library simplifies context propagation across threads, and across context mechanisms such
|
||||
as `ThreadLocal` values,
|
||||
Reactor https://projectreactor.io/docs/core/release/reference/#context[context],
|
||||
Reactor {reactor-site}/docs/core/release/reference/#context[context],
|
||||
GraphQL Java https://www.graphql-java.com/documentation/concerns/#context-objects[context],
|
||||
and others.
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
A common requirement for REST services is to include details in the body of error
|
||||
responses. The Spring Framework supports the "Problem Details for HTTP APIs"
|
||||
specification, https://www.rfc-editor.org/rfc/rfc7807.html[RFC 7807].
|
||||
specification, {rfc-site}/rfc7807[RFC 7807].
|
||||
|
||||
The following are the main abstractions for this support:
|
||||
|
||||
|
||||
@@ -19,16 +19,16 @@ This section describes the HTTP caching-related options that are available in Sp
|
||||
== `CacheControl`
|
||||
[.small]#xref:web/webflux/caching.adoc#webflux-caching-cachecontrol[See equivalent in the Reactive stack]#
|
||||
|
||||
{api-spring-framework}/http/CacheControl.html[`CacheControl`] provides support for
|
||||
{spring-framework-api}/http/CacheControl.html[`CacheControl`] provides support for
|
||||
configuring settings related to the `Cache-Control` header and is accepted as an argument
|
||||
in a number of places:
|
||||
|
||||
* {api-spring-framework}/web/servlet/mvc/WebContentInterceptor.html[`WebContentInterceptor`]
|
||||
* {api-spring-framework}/web/servlet/support/WebContentGenerator.html[`WebContentGenerator`]
|
||||
* {spring-framework-api}/web/servlet/mvc/WebContentInterceptor.html[`WebContentInterceptor`]
|
||||
* {spring-framework-api}/web/servlet/support/WebContentGenerator.html[`WebContentGenerator`]
|
||||
* xref:web/webmvc/mvc-caching.adoc#mvc-caching-etag-lastmodified[Controllers]
|
||||
* xref:web/webmvc/mvc-caching.adoc#mvc-caching-static-resources[Static Resources]
|
||||
|
||||
While https://tools.ietf.org/html/rfc7234#section-5.2.2[RFC 7234] describes all possible
|
||||
While {rfc-site}/rfc7234#section-5.2.2[RFC 7234] describes all possible
|
||||
directives for the `Cache-Control` response header, the `CacheControl` type takes a
|
||||
use case-oriented approach that focuses on the common scenarios:
|
||||
|
||||
|
||||
@@ -5,14 +5,13 @@
|
||||
|
||||
You can set the `HttpMessageConverter` instances to use in Java configuration,
|
||||
replacing the ones used by default, by overriding
|
||||
{api-spring-framework}/web/servlet/config/annotation/WebMvcConfigurer.html#configureMessageConverters-java.util.List-[`configureMessageConverters()`].
|
||||
{spring-framework-api}/web/servlet/config/annotation/WebMvcConfigurer.html#configureMessageConverters-java.util.List-[`configureMessageConverters()`].
|
||||
You can also customize the list of configured message converters at the end by overriding
|
||||
{api-spring-framework}/web/servlet/config/annotation/WebMvcConfigurer.html#extendMessageConverters-java.util.List-[`extendMessageConverters()`].
|
||||
{spring-framework-api}/web/servlet/config/annotation/WebMvcConfigurer.html#extendMessageConverters-java.util.List-[`extendMessageConverters()`].
|
||||
|
||||
TIP: In a Spring Boot application, the `WebMvcAutoConfiguration` adds any
|
||||
`HttpMessageConverter` beans it detects, in addition to default converters. Hence, in a
|
||||
Boot application, prefer to use the
|
||||
https://docs.spring.io/spring-framework/reference/web/webmvc/mvc-config/message-converters.html[HttpMessageConverters]
|
||||
Boot application, prefer to use the {spring-boot-docs}/web.html#web.servlet.spring-mvc.message-converters[HttpMessageConverters]
|
||||
mechanism. Or alternatively, use `extendMessageConverters` to modify message converters
|
||||
at the end.
|
||||
|
||||
@@ -60,24 +59,24 @@ Kotlin::
|
||||
======
|
||||
|
||||
In the preceding example,
|
||||
{api-spring-framework}/http/converter/json/Jackson2ObjectMapperBuilder.html[`Jackson2ObjectMapperBuilder`]
|
||||
{spring-framework-api}/http/converter/json/Jackson2ObjectMapperBuilder.html[`Jackson2ObjectMapperBuilder`]
|
||||
is used to create a common configuration for both `MappingJackson2HttpMessageConverter` and
|
||||
`MappingJackson2XmlHttpMessageConverter` with indentation enabled, a customized date format,
|
||||
and the registration of
|
||||
https://github.com/FasterXML/jackson-module-parameter-names[`jackson-module-parameter-names`],
|
||||
{jackson-github-org}/jackson-module-parameter-names[`jackson-module-parameter-names`],
|
||||
Which adds support for accessing parameter names (a feature added in Java 8).
|
||||
|
||||
This builder customizes Jackson's default properties as follows:
|
||||
|
||||
* https://fasterxml.github.io/jackson-databind/javadoc/2.6/com/fasterxml/jackson/databind/DeserializationFeature.html#FAIL_ON_UNKNOWN_PROPERTIES[`DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES`] is disabled.
|
||||
* https://fasterxml.github.io/jackson-databind/javadoc/2.6/com/fasterxml/jackson/databind/MapperFeature.html#DEFAULT_VIEW_INCLUSION[`MapperFeature.DEFAULT_VIEW_INCLUSION`] is disabled.
|
||||
* {jackson-docs}/jackson-databind/javadoc/2.6/com/fasterxml/jackson/databind/DeserializationFeature.html#FAIL_ON_UNKNOWN_PROPERTIES[`DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES`] is disabled.
|
||||
* {jackson-docs}/jackson-databind/javadoc/2.6/com/fasterxml/jackson/databind/MapperFeature.html#DEFAULT_VIEW_INCLUSION[`MapperFeature.DEFAULT_VIEW_INCLUSION`] is disabled.
|
||||
|
||||
It also automatically registers the following well-known modules if they are detected on the classpath:
|
||||
|
||||
* https://github.com/FasterXML/jackson-datatype-joda[jackson-datatype-joda]: Support for Joda-Time types.
|
||||
* https://github.com/FasterXML/jackson-datatype-jsr310[jackson-datatype-jsr310]: Support for Java 8 Date and Time API types.
|
||||
* https://github.com/FasterXML/jackson-datatype-jdk8[jackson-datatype-jdk8]: Support for other Java 8 types, such as `Optional`.
|
||||
* https://github.com/FasterXML/jackson-module-kotlin[`jackson-module-kotlin`]: Support for Kotlin classes and data classes.
|
||||
* {jackson-github-org}/jackson-datatype-joda[jackson-datatype-joda]: Support for Joda-Time types.
|
||||
* {jackson-github-org}/jackson-datatype-jsr310[jackson-datatype-jsr310]: Support for Java 8 Date and Time API types.
|
||||
* {jackson-github-org}/jackson-datatype-jdk8[jackson-datatype-jdk8]: Support for other Java 8 types, such as `Optional`.
|
||||
* {jackson-github-org}/jackson-module-kotlin[`jackson-module-kotlin`]: Support for Kotlin classes and data classes.
|
||||
|
||||
NOTE: Enabling indentation with Jackson XML support requires
|
||||
https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.codehaus.woodstox%22%20AND%20a%3A%22woodstox-core-asl%22[`woodstox-core-asl`]
|
||||
@@ -86,7 +85,7 @@ dependency in addition to https://search.maven.org/#search%7Cga%7C1%7Ca%3A%22jac
|
||||
Other interesting Jackson modules are available:
|
||||
|
||||
* https://github.com/zalando/jackson-datatype-money[jackson-datatype-money]: Support for `javax.money` types (unofficial module).
|
||||
* https://github.com/FasterXML/jackson-datatype-hibernate[jackson-datatype-hibernate]: Support for Hibernate-specific types and properties (including lazy-loading aspects).
|
||||
* {jackson-github-org}/jackson-datatype-hibernate[jackson-datatype-hibernate]: Support for Hibernate-specific types and properties (including lazy-loading aspects).
|
||||
|
||||
The following example shows how to achieve the same configuration in XML:
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
You can customize options related to path matching and treatment of the URL.
|
||||
For details on the individual options, see the
|
||||
{api-spring-framework}/web/servlet/config/annotation/PathMatchConfigurer.html[`PathMatchConfigurer`] javadoc.
|
||||
{spring-framework-api}/web/servlet/config/annotation/PathMatchConfigurer.html[`PathMatchConfigurer`] javadoc.
|
||||
|
||||
The following example shows how to customize path matching in Java configuration:
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
[.small]#xref:web/webflux/config.adoc#webflux-config-static-resources[See equivalent in the Reactive stack]#
|
||||
|
||||
This option provides a convenient way to serve static resources from a list of
|
||||
{api-spring-framework}/core/io/Resource.html[`Resource`]-based locations.
|
||||
{spring-framework-api}/core/io/Resource.html[`Resource`]-based locations.
|
||||
|
||||
In the next example, given a request that starts with `/resources`, the relative path is
|
||||
used to find and serve static resources relative to `/public` under the web application
|
||||
@@ -64,8 +64,8 @@ See also
|
||||
xref:web/webmvc/mvc-caching.adoc#mvc-caching-static-resources[HTTP caching support for static resources].
|
||||
|
||||
The resource handler also supports a chain of
|
||||
{api-spring-framework}/web/servlet/resource/ResourceResolver.html[`ResourceResolver`] implementations and
|
||||
{api-spring-framework}/web/servlet/resource/ResourceTransformer.html[`ResourceTransformer`] implementations,
|
||||
{spring-framework-api}/web/servlet/resource/ResourceResolver.html[`ResourceResolver`] implementations and
|
||||
{spring-framework-api}/web/servlet/resource/ResourceTransformer.html[`ResourceTransformer`] implementations,
|
||||
which you can use to create a toolchain for working with optimized resources.
|
||||
|
||||
You can use the `VersionResourceResolver` for versioned resource URLs based on an MD5 hash
|
||||
|
||||
@@ -47,7 +47,7 @@ Kotlin::
|
||||
In the preceding example, the method accepts a `Model` and returns a view name as a `String`,
|
||||
but many other options exist and are explained later in this chapter.
|
||||
|
||||
TIP: Guides and tutorials on https://spring.io/guides[spring.io] use the annotation-based
|
||||
TIP: Guides and tutorials on {spring-site-guides}[spring.io] use the annotation-based
|
||||
programming model described in this section.
|
||||
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ Kotlin::
|
||||
|
||||
The selectors in the preceding example are evaluated at runtime and may negatively impact
|
||||
performance if used extensively. See the
|
||||
{api-spring-framework}/web/bind/annotation/ControllerAdvice.html[`@ControllerAdvice`]
|
||||
{spring-framework-api}/web/bind/annotation/ControllerAdvice.html[`@ControllerAdvice`]
|
||||
javadoc for more details.
|
||||
|
||||
|
||||
|
||||
@@ -271,7 +271,7 @@ see xref:web/webmvc/mvc-ann-rest-exceptions.adoc[Error Responses]
|
||||
|
||||
| Any other return value
|
||||
| If a return value is not matched to any of the above and is not a simple type (as determined by
|
||||
{api-spring-framework}/beans/BeanUtils.html#isSimpleProperty-java.lang.Class-[BeanUtils#isSimpleProperty]),
|
||||
{spring-framework-api}/beans/BeanUtils.html#isSimpleProperty-java.lang.Class-[BeanUtils#isSimpleProperty]),
|
||||
by default, it is treated as a model attribute to be added to the model. If it is a simple type,
|
||||
it remains unresolved.
|
||||
|===
|
||||
|
||||
@@ -135,7 +135,7 @@ and others) and is equivalent to `required=false`.
|
||||
| Any other argument
|
||||
| If a method argument is not matched to any of the earlier values in this table and it is
|
||||
a simple type (as determined by
|
||||
{api-spring-framework}/beans/BeanUtils.html#isSimpleProperty-java.lang.Class-[BeanUtils#isSimpleProperty]),
|
||||
{spring-framework-api}/beans/BeanUtils.html#isSimpleProperty-java.lang.Class-[BeanUtils#isSimpleProperty]),
|
||||
it is resolved as a `@RequestParam`. Otherwise, it is resolved as a `@ModelAttribute`.
|
||||
|===
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ Spring offers support for the Jackson JSON library.
|
||||
[.small]#xref:web/webflux/controller/ann-methods/jackson.adoc#webflux-ann-jsonview[See equivalent in the Reactive stack]#
|
||||
|
||||
Spring MVC provides built-in support for
|
||||
https://www.baeldung.com/jackson-json-view-annotation[Jackson's Serialization Views],
|
||||
{baeldung-blog}/jackson-json-view-annotation[Jackson's Serialization Views],
|
||||
which allow rendering only a subset of all fields in an `Object`. To use it with
|
||||
`@ResponseBody` or `ResponseEntity` controller methods, you can use Jackson's
|
||||
`@JsonView` annotation to activate a serialization view class, as the following example shows:
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
[.small]#xref:web/webflux/controller/ann-methods/matrix-variables.adoc[See equivalent in the Reactive stack]#
|
||||
|
||||
https://tools.ietf.org/html/rfc3986#section-3.3[RFC 3986] discusses name-value pairs in
|
||||
{rfc-site}/rfc3986#section-3.3[RFC 3986] discusses name-value pairs in
|
||||
path segments. In Spring MVC, we refer to those as "`matrix variables`" based on an
|
||||
https://www.w3.org/DesignIssues/MatrixURIs.html["`old post`"] by Tim Berners-Lee, but they
|
||||
can be also be referred to as URI path parameters.
|
||||
|
||||
@@ -242,5 +242,5 @@ xref:web/webmvc/mvc-controller/ann-validation.adoc[Validation].
|
||||
|
||||
TIP: Using `@ModelAttribute` is optional. By default, any parameter that is not a simple
|
||||
value type as determined by
|
||||
{api-spring-framework}/beans/BeanUtils.html#isSimpleProperty-java.lang.Class-[BeanUtils#isSimpleProperty]
|
||||
{spring-framework-api}/beans/BeanUtils.html#isSimpleProperty-java.lang.Class-[BeanUtils#isSimpleProperty]
|
||||
_AND_ that is not resolved by any other argument resolver is treated as an `@ModelAttribute`.
|
||||
|
||||
@@ -75,7 +75,7 @@ then the map is populated with the request parameter values for each given param
|
||||
|
||||
Note that use of `@RequestParam` is optional (for example, to set its attributes).
|
||||
By default, any argument that is a simple value type (as determined by
|
||||
{api-spring-framework}/beans/BeanUtils.html#isSimpleProperty-java.lang.Class-[BeanUtils#isSimpleProperty])
|
||||
{spring-framework-api}/beans/BeanUtils.html#isSimpleProperty-java.lang.Class-[BeanUtils#isSimpleProperty])
|
||||
and is not resolved by any other argument resolver, is treated as if it were annotated
|
||||
with `@RequestParam`.
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ supported for all return values.
|
||||
| Other return values
|
||||
| If a return value remains unresolved in any other way, it is treated as a model
|
||||
attribute, unless it is a simple type as determined by
|
||||
{api-spring-framework}/beans/BeanUtils.html#isSimpleProperty-java.lang.Class-[BeanUtils#isSimpleProperty],
|
||||
{spring-framework-api}/beans/BeanUtils.html#isSimpleProperty-java.lang.Class-[BeanUtils#isSimpleProperty],
|
||||
in which case it remains unresolved.
|
||||
|===
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ Kotlin::
|
||||
|
||||
|
||||
NOTE: When a name is not explicitly specified, a default name is chosen based on the `Object`
|
||||
type, as explained in the javadoc for {api-spring-framework}/core/Conventions.html[`Conventions`].
|
||||
type, as explained in the javadoc for {spring-framework-api}/core/Conventions.html[`Conventions`].
|
||||
You can always assign an explicit name by using the overloaded `addAttribute` method or
|
||||
through the `name` attribute on `@ModelAttribute` (for a return value).
|
||||
|
||||
|
||||
@@ -104,8 +104,8 @@ at the end of a path. `PathPattern` also restricts the use of `+**+` for matchin
|
||||
path segments such that it's only allowed at the end of a pattern. This eliminates many
|
||||
cases of ambiguity when choosing the best matching pattern for a given request.
|
||||
For full pattern syntax please refer to
|
||||
{api-spring-framework}/web/util/pattern/PathPattern.html[PathPattern] and
|
||||
{api-spring-framework}/util/AntPathMatcher.html[AntPathMatcher].
|
||||
{spring-framework-api}/web/util/pattern/PathPattern.html[PathPattern] and
|
||||
{spring-framework-api}/util/AntPathMatcher.html[AntPathMatcher].
|
||||
|
||||
Some example patterns:
|
||||
|
||||
@@ -226,8 +226,8 @@ some external configuration.
|
||||
When multiple patterns match a URL, the best match must be selected. This is done with
|
||||
one of the following depending on whether use of parsed `PathPattern` is enabled for use or not:
|
||||
|
||||
* {api-spring-framework}/web/util/pattern/PathPattern.html#SPECIFICITY_COMPARATOR[`PathPattern.SPECIFICITY_COMPARATOR`]
|
||||
* {api-spring-framework}/util/AntPathMatcher.html#getPatternComparator-java.lang.String-[`AntPathMatcher.getPatternComparator(String path)`]
|
||||
* {spring-framework-api}/web/util/pattern/PathPattern.html#SPECIFICITY_COMPARATOR[`PathPattern.SPECIFICITY_COMPARATOR`]
|
||||
* {spring-framework-api}/util/AntPathMatcher.html#getPatternComparator-java.lang.String-[`AntPathMatcher.getPatternComparator(String path)`]
|
||||
|
||||
Both help to sort patterns with more specific ones on top. A pattern is more specific if
|
||||
it has a lower count of URI variables (counted as 1), single wildcards (counted as 1),
|
||||
@@ -296,7 +296,7 @@ Many common path extensions are allowed as safe by default. Applications with cu
|
||||
negotiation to avoid having a `Content-Disposition` header added for those extensions.
|
||||
See xref:web/webmvc/mvc-config/content-negotiation.adoc[Content Types].
|
||||
|
||||
See https://pivotal.io/security/cve-2015-5211[CVE-2015-5211] for additional
|
||||
See {spring-site-cve}/cve-2015-5211[CVE-2015-5211] for additional
|
||||
recommendations related to RFD.
|
||||
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ raise `MethodArgumentNotValidException` in case of validation errors. If you wan
|
||||
the errors in the controller method instead, you can declare an `Errors` or `BindingResult`
|
||||
method parameter immediately after the validated parameter.
|
||||
|
||||
Second, if https://beanvalidation.org/[Java Bean Validation] is present _AND_ other method
|
||||
Second, if {bean-validation-site}[Java Bean Validation] is present _AND_ other method
|
||||
parameters, e.g. `@RequestHeader`, `@RequestParam`, `@PathVariable` have `@Constraint`
|
||||
annotations, then method validation is applied to all method arguments, raising
|
||||
`HandlerMethodValidationException` in case of validation errors. You can still declare an
|
||||
|
||||
@@ -8,7 +8,7 @@ Servlet 4 containers are required to support HTTP/2, and Spring Framework 5 is c
|
||||
with Servlet API 4. From a programming model perspective, there is nothing specific that
|
||||
applications need to do. However, there are considerations related to server configuration.
|
||||
For more details, see the
|
||||
https://github.com/spring-projects/spring-framework/wiki/HTTP-2-support[HTTP/2 wiki page].
|
||||
{spring-framework-wiki}/HTTP-2-support[HTTP/2 wiki page].
|
||||
|
||||
The Servlet API does expose one construct related to HTTP/2. You can use the
|
||||
`jakarta.servlet.http.PushBuilder` to proactively push resources to clients, and it
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
[.small]#xref:web/webflux/security.adoc[See equivalent in the Reactive stack]#
|
||||
|
||||
The https://spring.io/projects/spring-security[Spring Security] project provides support
|
||||
The {spring-site-projects}/spring-security[Spring Security] project provides support
|
||||
for protecting web applications from malicious exploits. See the Spring Security
|
||||
reference documentation, including:
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ NOTE: In addition to using the ServletContext API directly, you can also extend
|
||||
|
||||
NOTE: For programmatic use cases, a `GenericWebApplicationContext` can be used as an
|
||||
alternative to `AnnotationConfigWebApplicationContext`. See the
|
||||
{api-spring-framework}/web/context/support/GenericWebApplicationContext.html[`GenericWebApplicationContext`]
|
||||
{spring-framework-api}/web/context/support/GenericWebApplicationContext.html[`GenericWebApplicationContext`]
|
||||
javadoc for details.
|
||||
|
||||
The following example of `web.xml` configuration registers and initializes the `DispatcherServlet`:
|
||||
@@ -111,7 +111,7 @@ the lifecycle of the Servlet container, Spring Boot uses Spring configuration to
|
||||
bootstrap itself and the embedded Servlet container. `Filter` and `Servlet` declarations
|
||||
are detected in Spring configuration and registered with the Servlet container.
|
||||
For more details, see the
|
||||
https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#boot-features-embedded-container[Spring Boot documentation].
|
||||
{spring-boot-docs}/web.html#web.servlet.embedded-container[Spring Boot documentation].
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ Applications can declare the infrastructure beans listed in xref:web/webmvc/mvc-
|
||||
that are required to process requests. The `DispatcherServlet` checks the
|
||||
`WebApplicationContext` for each special bean. If there are no matching bean types,
|
||||
it falls back on the default types listed in
|
||||
{spring-framework-main-code}/spring-webmvc/src/main/resources/org/springframework/web/servlet/DispatcherServlet.properties[`DispatcherServlet.properties`].
|
||||
{spring-framework-code}/spring-webmvc/src/main/resources/org/springframework/web/servlet/DispatcherServlet.properties[`DispatcherServlet.properties`].
|
||||
|
||||
In most cases, the xref:web/webmvc/mvc-config.adoc[MVC Config] is the best starting point. It declares the required
|
||||
beans in either Java or XML and provides a higher-level configuration callback API to
|
||||
|
||||
@@ -19,7 +19,7 @@ The following table lists the available `HandlerExceptionResolver` implementatio
|
||||
| A mapping between exception class names and error view names. Useful for rendering
|
||||
error pages in a browser application.
|
||||
|
||||
| {api-spring-framework}/web/servlet/mvc/support/DefaultHandlerExceptionResolver.html[`DefaultHandlerExceptionResolver`]
|
||||
| {spring-framework-api}/web/servlet/mvc/support/DefaultHandlerExceptionResolver.html[`DefaultHandlerExceptionResolver`]
|
||||
| Resolves exceptions raised by Spring MVC and maps them to HTTP status codes.
|
||||
See also alternative `ResponseEntityExceptionHandler` and xref:web/webmvc/mvc-ann-rest-exceptions.adoc[Error Responses].
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ This resolver variant uses your Servlet container's multipart parser as-is,
|
||||
potentially exposing the application to container implementation differences.
|
||||
By default, it will try to parse any `multipart/` content type with any HTTP
|
||||
method but this may not be supported across all Servlet containers. See the
|
||||
{api-spring-framework}/web/multipart/support/StandardServletMultipartResolver.html[`StandardServletMultipartResolver`]
|
||||
{spring-framework-api}/web/multipart/support/StandardServletMultipartResolver.html[`StandardServletMultipartResolver`]
|
||||
javadoc for details and configuration options.
|
||||
====
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ The following table provides more details on the `ViewResolver` hierarchy:
|
||||
| Convenient subclass of `UrlBasedViewResolver` that supports `InternalResourceView` (in
|
||||
effect, Servlets and JSPs) and subclasses such as `JstlView`. You can specify the view
|
||||
class for all views generated by this resolver by using `setViewClass(..)`.
|
||||
See the {api-spring-framework}/web/reactive/result/view/UrlBasedViewResolver.html[`UrlBasedViewResolver`]
|
||||
See the {spring-framework-api}/web/reactive/result/view/UrlBasedViewResolver.html[`UrlBasedViewResolver`]
|
||||
javadoc for details.
|
||||
|
||||
| `FreeMarkerViewResolver`
|
||||
@@ -103,7 +103,7 @@ Servlet/JSP engine. Note that you may also chain multiple view resolvers, instea
|
||||
== Content Negotiation
|
||||
[.small]#xref:web/webflux/dispatcher-handler.adoc#webflux-multiple-representations[See equivalent in the Reactive stack]#
|
||||
|
||||
{api-spring-framework}/web/servlet/view/ContentNegotiatingViewResolver.html[`ContentNegotiatingViewResolver`]
|
||||
{spring-framework-api}/web/servlet/view/ContentNegotiatingViewResolver.html[`ContentNegotiatingViewResolver`]
|
||||
does not resolve views itself but rather delegates
|
||||
to other view resolvers and selects the view that resembles the representation requested
|
||||
by the client. The representation can be determined from the `Accept` header or from a
|
||||
|
||||
Reference in New Issue
Block a user