Skip to content

Commit 14de29c

Browse files
committed
Improve VersionResourceResolve javadoc
The `pathPatterns` args are relative to the patterns configured for the resource handler. Issue: SPR-14817 Cherry-picked from: 52f6641
1 parent b59455b commit 14de29c

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

spring-webmvc/src/main/java/org/springframework/web/servlet/resource/VersionResourceResolver.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ public Map<String, VersionStrategy> getStrategyMap() {
9393
* default strategy to use except when it cannot be, for example when using
9494
* JavaScript module loaders, use {@link #addFixedVersionStrategy} instead
9595
* for serving JavaScript files.
96-
* @param pathPatterns one or more resource URL path patterns
96+
* @param pathPatterns one or more resource URL path patterns,
97+
* relative to the pattern configured with the resource handler
9798
* @return the current instance for chained method invocation
9899
* @see ContentVersionStrategy
99100
*/
@@ -115,7 +116,8 @@ public VersionResourceResolver addContentVersionStrategy(String... pathPatterns)
115116
* will also cofigure automatically a {@code "/v1.0.0/js/**"} with {@code "v1.0.0"} the
116117
* {@code version} String given as an argument.
117118
* @param version a version string
118-
* @param pathPatterns one or more resource URL path patterns
119+
* @param pathPatterns one or more resource URL path patterns,
120+
* relative to the pattern configured with the resource handler
119121
* @return the current instance for chained method invocation
120122
* @see FixedVersionStrategy
121123
*/
@@ -136,7 +138,8 @@ public VersionResourceResolver addFixedVersionStrategy(String version, String...
136138
* Register a custom VersionStrategy to apply to resource URLs that match the
137139
* given path patterns.
138140
* @param strategy the custom strategy
139-
* @param pathPatterns one or more resource URL path patterns
141+
* @param pathPatterns one or more resource URL path patterns,
142+
* relative to the pattern configured with the resource handler
140143
* @return the current instance for chained method invocation
141144
* @see VersionStrategy
142145
*/

0 commit comments

Comments
 (0)