From d9a93f44ae876c9d82c085ec5258ca7fcbd137af Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Wed, 31 Jan 2018 12:02:27 -0500 Subject: [PATCH] [doc] Update links to composed annotations --- src/docs/asciidoc/web/webflux.adoc | 18 ++++++++++-------- src/docs/asciidoc/web/webmvc.adoc | 18 ++++++++++-------- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/src/docs/asciidoc/web/webflux.adoc b/src/docs/asciidoc/web/webflux.adoc index e0d97730c9..16eb2947e2 100644 --- a/src/docs/asciidoc/web/webflux.adoc +++ b/src/docs/asciidoc/web/webflux.adoc @@ -816,10 +816,10 @@ your Java configuration: } ---- -`@RestController` is a composed annotation that is itself annotated with -`@Controller` and `@ResponseBody` indicating a controller whose every method inherits the type-level -`@ResponseBody` annotation and therefore writes to the response body (vs model-and-vew -rendering). +`@RestController` is a <> that is +itself meta-annotated with `@Controller` and `@ResponseBody` indicating a controller whose +every method inherits the type-level `@ResponseBody` annotation and therefore writes +directly to the response body vs view resolution and rendering with an HTML template. @@ -840,10 +840,12 @@ There are also HTTP method specific shortcut variants of `@RequestMapping`: - `@DeleteMapping` - `@PatchMapping` -The shortcut variants are -https://github.com/spring-projects/spring-framework/wiki/Spring-Annotation-Programming-Model#composed-annotations[composed annotations] --- themselves annotated with `@RequestMapping`. They are commonly used at the method level. -At the class level an `@RequestMapping` is more useful for expressing shared mappings. +The above are <> that are provided out of the box +because arguably most controller methods should be mapped to a specific HTTP method vs +using `@RequestMapping` which by default matches to all HTTP methods. At the same an +`@RequestMapping` is still needed at the class level to express shared mappings. + +Below is an example with type and method level mappings: [source,java,indent=0] [subs="verbatim,quotes"] diff --git a/src/docs/asciidoc/web/webmvc.adoc b/src/docs/asciidoc/web/webmvc.adoc index 888d6cf783..8851748571 100644 --- a/src/docs/asciidoc/web/webmvc.adoc +++ b/src/docs/asciidoc/web/webmvc.adoc @@ -1062,10 +1062,10 @@ The XML configuration equivalent: ---- -`@RestController` is a composed annotation that is itself annotated with -`@Controller` and `@ResponseBody` indicating a controller whose every method inherits the type-level -`@ResponseBody` annotation and therefore writes to the response body (vs model-and-vew -rendering). +`@RestController` is a <> that is +itself meta-annotated with `@Controller` and `@ResponseBody` indicating a controller whose +every method inherits the type-level `@ResponseBody` annotation and therefore writes +directly to the response body vs view resolution and rendering with an HTML template. [[mvc-ann-requestmapping-proxying]] @@ -1099,10 +1099,12 @@ There are also HTTP method specific shortcut variants of `@RequestMapping`: - `@DeleteMapping` - `@PatchMapping` -The shortcut variants are -https://github.com/spring-projects/spring-framework/wiki/Spring-Annotation-Programming-Model#composed-annotations[composed annotations] --- themselves annotated with `@RequestMapping`. They are commonly used at the method level. -At the class level an `@RequestMapping` is more useful for expressing shared mappings. +The above are <> that are provided out of the box +because arguably most controller methods should be mapped to a specific HTTP method vs +using `@RequestMapping` which by default matches to all HTTP methods. At the same an +`@RequestMapping` is still needed at the class level to express shared mappings. + +Below is an example with type and method level mappings: [source,java,indent=0] [subs="verbatim,quotes"] -- GitLab