Fix Javadoc for PathPattern
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -40,16 +40,16 @@ import org.springframework.util.StringUtils;
|
||||
* <li>{@code ?} matches one character</li>
|
||||
* <li>{@code *} matches zero or more characters within a path segment</li>
|
||||
* <li>{@code **} matches zero or more <em>path segments</em> until the end of the path</li>
|
||||
* <li>{@code {spring}} matches a <em>path segment</em> and captures it as a variable named "spring"</li>
|
||||
* <li>{@code {spring:[a-z]+}} matches the regexp {@code [a-z]+} as a path variable named "spring"</li>
|
||||
* <li>{@code {*spring}} matches zero or more <em>path segments</em> until the end of the path
|
||||
* <li><code>{spring}</code> matches a <em>path segment</em> and captures it as a variable named "spring"</li>
|
||||
* <li><code>{spring:[a-z]+}</code> matches the regexp {@code [a-z]+} as a path variable named "spring"</li>
|
||||
* <li><code>{*spring}</code> matches zero or more <em>path segments</em> until the end of the path
|
||||
* and captures it as a variable named "spring"</li>
|
||||
* </ul>
|
||||
*
|
||||
* <h3>Examples</h3>
|
||||
* <ul>
|
||||
* <li>{@code /pages/t?st.html} — matches {@code /pages/test.html} but also
|
||||
* {@code /pages/tast.html} but not {@code /pages/toast.html}</li>
|
||||
* <li>{@code /pages/t?st.html} — matches {@code /pages/test.html} as well as
|
||||
* {@code /pages/tXst.html} but not {@code /pages/toast.html}</li>
|
||||
* <li>{@code /resources/*.png} — matches all {@code .png} files in the
|
||||
* {@code resources} directory</li>
|
||||
* <li><code>/resources/**</code> — matches all files
|
||||
@@ -58,9 +58,9 @@ import org.springframework.util.StringUtils;
|
||||
* <li><code>/resources/{*path}</code> — matches all files
|
||||
* underneath the {@code /resources/} path and captures their relative path in
|
||||
* a variable named "path"; {@code /resources/image.png} will match with
|
||||
* "spring" -> "/image.png", and {@code /resources/css/spring.css} will match
|
||||
* with "spring" -> "/css/spring.css"</li>
|
||||
* <li>{@code /resources/{filename:\\w+}.dat} will match {@code /resources/spring.dat}
|
||||
* "spring" → "/image.png", and {@code /resources/css/spring.css} will match
|
||||
* with "spring" → "/css/spring.css"</li>
|
||||
* <li><code>/resources/{filename:\\w+}.dat</code> will match {@code /resources/spring.dat}
|
||||
* and assign the value {@code "spring"} to the {@code filename} variable</li>
|
||||
* </ul>
|
||||
*
|
||||
@@ -260,10 +260,10 @@ public class PathPattern implements Comparable<PathPattern> {
|
||||
/**
|
||||
* Determine the pattern-mapped part for the given path.
|
||||
* <p>For example: <ul>
|
||||
* <li>'{@code /docs/cvs/commit.html}' and '{@code /docs/cvs/commit.html} -> ''</li>
|
||||
* <li>'{@code /docs/*}' and '{@code /docs/cvs/commit}' -> '{@code cvs/commit}'</li>
|
||||
* <li>'{@code /docs/cvs/*.html}' and '{@code /docs/cvs/commit.html} -> '{@code commit.html}'</li>
|
||||
* <li>'{@code /docs/**}' and '{@code /docs/cvs/commit} -> '{@code cvs/commit}'</li>
|
||||
* <li>'{@code /docs/cvs/commit.html}' and '{@code /docs/cvs/commit.html} → ''</li>
|
||||
* <li>'{@code /docs/*}' and '{@code /docs/cvs/commit}' → '{@code cvs/commit}'</li>
|
||||
* <li>'{@code /docs/cvs/*.html}' and '{@code /docs/cvs/commit.html} → '{@code commit.html}'</li>
|
||||
* <li>'{@code /docs/**}' and '{@code /docs/cvs/commit} → '{@code cvs/commit}'</li>
|
||||
* </ul>
|
||||
* <p><b>Notes:</b>
|
||||
* <ul>
|
||||
|
||||
Reference in New Issue
Block a user