Update docs for PathPattern support in WebMvc

Closes gh-24945
This commit is contained in:
Rossen Stoyanchev
2020-06-18 21:16:21 +01:00
parent 2d5f9723fa
commit ce728a6c4b
2 changed files with 49 additions and 67 deletions

View File

@@ -47,9 +47,12 @@ import org.springframework.util.StringUtils;
* and captures it as a variable named "spring"</li>
* </ul>
*
* Notable behavior difference with {@code AntPathMatcher}:<br>
* {@code **} and its capturing variant <code>{*spring}</code> cannot be used in the middle of a pattern
* string, only at the end: {@code /pages/{**}} is valid, but {@code /pages/{**}/details} is not.
* <p><strong>Note:</strong> In contrast to
* {@link org.springframework.util.AntPathMatcher}, {@code **} is supported only
* at the end of a pattern. For example {@code /pages/{**}} is valid but
* {@code /pages/{**}/details} is not. The same applies also to the capturing
* variant <code>{*spring}</code>. The aim is to eliminate ambiguity when
* comparing patterns for specificity.
*
* <h3>Examples</h3>
* <ul>