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:
@@ -64,6 +64,6 @@ 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.
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ and others) and is equivalent to `required=false`.
|
||||
| Any other argument
|
||||
| If a method argument is not matched to any of the above, it is, by default, resolved as
|
||||
a `@RequestParam` if 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],
|
||||
or as a `@ModelAttribute`, otherwise.
|
||||
|===
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ Spring offers support for the Jackson JSON library.
|
||||
[.small]#xref:web/webmvc/mvc-controller/ann-methods/jackson.adoc[See equivalent in the Servlet stack]#
|
||||
|
||||
Spring WebFlux 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 allows 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/webmvc/mvc-controller/ann-methods/matrix-variables.adoc[See equivalent in the Servlet 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 WebFlux, 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.
|
||||
|
||||
@@ -197,7 +197,7 @@ controller method xref:web/webmvc/mvc-controller/ann-validation.adoc[Validation]
|
||||
|
||||
TIP: Using `@ModelAttribute` is optional. By default, any argument 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`.
|
||||
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ When a `@RequestParam` annotation is declared on a `Map<String, String>` or
|
||||
|
||||
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`.
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ generally 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.
|
||||
|===
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ Kotlin::
|
||||
======
|
||||
|
||||
NOTE: When a name is not explicitly specified, a default name is chosen based on the type,
|
||||
as explained in the javadoc for {api-spring-framework}/core/Conventions.html[`Conventions`].
|
||||
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).
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user