|
1 | 1 | /*
|
2 |
| - * Copyright 2002-2018 the original author or authors. |
| 2 | + * Copyright 2002-2019 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
|
40 | 40 | * <li>{@code ?} matches one character</li>
|
41 | 41 | * <li>{@code *} matches zero or more characters within a path segment</li>
|
42 | 42 | * <li>{@code **} matches zero or more <em>path segments</em> until the end of the path</li>
|
43 |
| - * <li>{@code {spring}} matches a <em>path segment</em> and captures it as a variable named "spring"</li> |
44 |
| - * <li>{@code {spring:[a-z]+}} matches the regexp {@code [a-z]+} as a path variable named "spring"</li> |
45 |
| - * <li>{@code {*spring}} matches zero or more <em>path segments</em> until the end of the path |
| 43 | + * <li><code>{spring}</code> matches a <em>path segment</em> and captures it as a variable named "spring"</li> |
| 44 | + * <li><code>{spring:[a-z]+}</code> matches the regexp {@code [a-z]+} as a path variable named "spring"</li> |
| 45 | + * <li><code>{*spring}</code> matches zero or more <em>path segments</em> until the end of the path |
46 | 46 | * and captures it as a variable named "spring"</li>
|
47 | 47 | * </ul>
|
48 | 48 | *
|
49 | 49 | * <h3>Examples</h3>
|
50 | 50 | * <ul>
|
51 |
| - * <li>{@code /pages/t?st.html} — matches {@code /pages/test.html} but also |
52 |
| - * {@code /pages/tast.html} but not {@code /pages/toast.html}</li> |
| 51 | + * <li>{@code /pages/t?st.html} — matches {@code /pages/test.html} as well as |
| 52 | + * {@code /pages/tXst.html} but not {@code /pages/toast.html}</li> |
53 | 53 | * <li>{@code /resources/*.png} — matches all {@code .png} files in the
|
54 | 54 | * {@code resources} directory</li>
|
55 | 55 | * <li><code>/resources/**</code> — matches all files
|
|
58 | 58 | * <li><code>/resources/{*path}</code> — matches all files
|
59 | 59 | * underneath the {@code /resources/} path and captures their relative path in
|
60 | 60 | * a variable named "path"; {@code /resources/image.png} will match with
|
61 |
| - * "spring" -> "/image.png", and {@code /resources/css/spring.css} will match |
62 |
| - * with "spring" -> "/css/spring.css"</li> |
63 |
| - * <li>{@code /resources/{filename:\\w+}.dat} will match {@code /resources/spring.dat} |
| 61 | + * "spring" → "/image.png", and {@code /resources/css/spring.css} will match |
| 62 | + * with "spring" → "/css/spring.css"</li> |
| 63 | + * <li><code>/resources/{filename:\\w+}.dat</code> will match {@code /resources/spring.dat} |
64 | 64 | * and assign the value {@code "spring"} to the {@code filename} variable</li>
|
65 | 65 | * </ul>
|
66 | 66 | *
|
@@ -260,10 +260,10 @@ else if (!hasLength(pathContainer)) {
|
260 | 260 | /**
|
261 | 261 | * Determine the pattern-mapped part for the given path.
|
262 | 262 | * <p>For example: <ul>
|
263 |
| - * <li>'{@code /docs/cvs/commit.html}' and '{@code /docs/cvs/commit.html} -> ''</li> |
264 |
| - * <li>'{@code /docs/*}' and '{@code /docs/cvs/commit}' -> '{@code cvs/commit}'</li> |
265 |
| - * <li>'{@code /docs/cvs/*.html}' and '{@code /docs/cvs/commit.html} -> '{@code commit.html}'</li> |
266 |
| - * <li>'{@code /docs/**}' and '{@code /docs/cvs/commit} -> '{@code cvs/commit}'</li> |
| 263 | + * <li>'{@code /docs/cvs/commit.html}' and '{@code /docs/cvs/commit.html} → ''</li> |
| 264 | + * <li>'{@code /docs/*}' and '{@code /docs/cvs/commit}' → '{@code cvs/commit}'</li> |
| 265 | + * <li>'{@code /docs/cvs/*.html}' and '{@code /docs/cvs/commit.html} → '{@code commit.html}'</li> |
| 266 | + * <li>'{@code /docs/**}' and '{@code /docs/cvs/commit} → '{@code cvs/commit}'</li> |
267 | 267 | * </ul>
|
268 | 268 | * <p><b>Notes:</b>
|
269 | 269 | * <ul>
|
|
0 commit comments