接口 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.1
- 作者:
- Brian Clozel, Rossen Stoyanchev
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 String
addVersion(String requestPath, String version)
Add a version to the given request path.String
extractVersion(String requestPath)
Extract the resource version from the request path.String
removeVersion(String requestPath, String version)
Remove the version from the request path.
方法详细资料
extractVersion
@Nullable String extractVersion(String requestPath)
Extract the resource version from the request path.- 参数:
requestPath
- the request path to check- 返回:
- the version string or
null
if none was found
removeVersion
String removeVersion(String requestPath, String version)
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
String addVersion(String requestPath, String version)
Add a version to the given request path.- 参数:
requestPath
- the requestPathversion
- the version- 返回:
- the requestPath updated with a version string