类 AbstractVersionStrategy
java.lang.Object
cn.taketoday.web.resource.AbstractVersionStrategy
- 所有已实现的接口:
VersionPathStrategy,VersionStrategy
Abstract base class for
VersionStrategy implementations.
Supports versions as:
- prefix in the request path, like "version/static/myresource.js"
- file name suffix in the request path, like "static/myresource-version.js"
Note: This base class does not provide support for generating the version string.
- 从以下版本开始:
- 4.0
- 作者:
- Brian Clozel, Rossen Stoyanchev
-
嵌套类概要
嵌套类修饰符和类型类说明protected static classFile name-basedVersionPathStrategy, e.g.protected static classA prefix-basedVersionPathStrategy, e.g. -
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明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.从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 cn.taketoday.web.resource.VersionStrategy
getResourceVersion
-
字段详细资料
-
logger
protected final cn.taketoday.logging.Logger logger -
pathStrategy
-
-
构造器详细资料
-
AbstractVersionStrategy
-
-
方法详细资料
-
getVersionPathStrategy
-
extractVersion
从接口复制的说明: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
从接口复制的说明:VersionPathStrategyRemove the version from the request path. It is assumed that the given version was extracted viaVersionPathStrategy.extractVersion(String).- 指定者:
removeVersion在接口中VersionPathStrategy- 参数:
requestPath- the request path of the resource being resolvedversion- the version obtained fromVersionPathStrategy.extractVersion(String)- 返回:
- the request path with the version removed
-
addVersion
从接口复制的说明:VersionPathStrategyAdd a version to the given request path.- 指定者:
addVersion在接口中VersionPathStrategy- 参数:
requestPath- the requestPathversion- the version- 返回:
- the requestPath updated with a version string
-