接口 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
  • 方法详细资料

    • 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 via extractVersion(String).
      参数:
      requestPath - the request path of the resource being resolved
      version - the version obtained from extractVersion(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 requestPath
      version - the version
      返回:
      the requestPath updated with a version string