From 810b615471416a9649cd4a32a103442e864666ed Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Mon, 21 Jan 2019 11:21:04 -0500 Subject: [PATCH] Correct issus in Spring MVC section Fixes #22282 --- src/docs/asciidoc/web/webmvc.adoc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/docs/asciidoc/web/webmvc.adoc b/src/docs/asciidoc/web/webmvc.adoc index a1d87fc9508..56a66538665 100644 --- a/src/docs/asciidoc/web/webmvc.adoc +++ b/src/docs/asciidoc/web/webmvc.adoc @@ -1359,7 +1359,7 @@ The following example has type and method level mappings: ==== URI patterns [.small]#<># -You can map requests by using the following glob patterns and wildcards: +You can map requests by using the following global patterns and wildcards: * `?` matches one character * `*` matches zero or more characters within a path segment @@ -1439,10 +1439,10 @@ When multiple patterns match a URL, they must be compared to find the best match by using `AntPathMatcher.getPatternComparator(String path)`, which looks for patterns that are more specific. -A pattern is less specific if it has a lower count of URI variables and single wildcards -counted as 1 and double wildcards counted as 2. Given an equal score, the longer pattern is -chosen. Given the same score and length, the pattern with more URI variables than wildcards -is chosen. +A pattern is less specific if it has a lower count of URI variables (counted as 1), single +wildcards (counted as 1), and double wildcards (counted as 2). Given an equal score, the +longer pattern is chosen. Given the same score and length, the pattern with more URI variables +than wildcards is chosen. The default mapping pattern (`/{asterisk}{asterisk}`) is excluded from scoring and always sorted last. Also, prefix patterns (such as `/public/{asterisk}{asterisk}`) are considered less @@ -2291,7 +2291,7 @@ alternatively, set `@ModelAttribute(binding=false)`, as the following example sh } @PostMapping("update") - public String update(@Valid AccountUpdateForm form, BindingResult result, + public String update(@Valid AccountForm form, BindingResult result, @ModelAttribute(binding=false) Account account) { <1> // ... } @@ -2300,7 +2300,7 @@ alternatively, set `@ModelAttribute(binding=false)`, as the following example sh ==== You can automatically apply validation after data binding by adding the -`javax.validation.Valid` annotation or Spring's `@Validated` annotation (ee +`javax.validation.Valid` annotation or Spring's `@Validated` annotation ( <> and <>). The following example shows how to do so: @@ -2458,7 +2458,7 @@ Java configuration keep this flag set to `false`, to maintain backwards compatib However, for new applications, we recommend setting it to `true`. Note that URI template variables from the present request are automatically made -available when expanding a redirect URL, and you need explicitly add them +available when expanding a redirect URL, and you don't need to explicitly add them through `Model` or `RedirectAttributes`. The following example shows how to define a redirect: ====