接口 VersionPathStrategy
- 所有已知子接口:
VersionStrategy
- 所有已知实现类:
AbstractVersionStrategy,AbstractVersionStrategy.FileNameVersionPathStrategy,AbstractVersionStrategy.PrefixVersionPathStrategy,ContentVersionStrategy,FixedVersionStrategy
public interface VersionPathStrategy
A strategy for extracting and embedding a resource version in its URL path.
- 从以下版本开始:
- 4.0
- 作者:
- Brian Clozel, Rossen Stoyanchev
-
方法概要
修饰符和类型方法说明addVersion(String requestPath, String version) Add a version to the given request path.extractVersion(String requestPath) Extract the resource version from the request path.removeVersion(String requestPath, String version) Remove the version from the request path.
-
方法详细资料
-
extractVersion
Extract the resource version from the request path.- 参数:
requestPath- the request path to check- 返回:
- the version string or
nullif none was found
-
removeVersion
Remove the version from the request path. It is assumed that the given version was extracted viaextractVersion(String).- 参数:
requestPath- the request path of the resource being resolvedversion- the version obtained fromextractVersion(String)- 返回:
- the request path with the version removed
-
addVersion
Add a version to the given request path.- 参数:
requestPath- the requestPathversion- the version- 返回:
- the requestPath updated with a version string
-