类 AbstractVersionStrategy.FileNameVersionPathStrategy
- java.lang.Object
- org.springframework.web.servlet.resource.AbstractVersionStrategy.FileNameVersionPathStrategy
- 所有已实现的接口:
VersionPathStrategy
protected static class AbstractVersionStrategy.FileNameVersionPathStrategy extends Object implements VersionPathStrategy
File name-basedVersionPathStrategy, e.g."path/foo-{version}.css".
构造器概要
构造器 限定符 构造器 说明 protectedFileNameVersionPathStrategy()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 StringaddVersion(String requestPath, String version)Add a version to the given request path.StringextractVersion(String requestPath)Extract the resource version from the request path.StringremoveVersion(String requestPath, String version)Remove the version from the request path.
构造器详细资料
FileNameVersionPathStrategy
protected FileNameVersionPathStrategy()
方法详细资料
extractVersion
@Nullable public String extractVersion(String requestPath)
从接口复制的说明:VersionPathStrategyExtract the resource version from the request path.- 指定者:
extractVersion在接口中VersionPathStrategy- 参数:
requestPath- the request path to check- 返回:
- the version string or
nullif none was found
removeVersion
public String removeVersion(String requestPath, String version)
从接口复制的说明:VersionPathStrategyRemove the version from the request path. It is assumed that the given version was extracted viaVersionPathStrategy.extractVersion(String).