类 FixedVersionStrategy

java.lang.Object
cn.taketoday.web.resource.AbstractVersionStrategy
cn.taketoday.web.resource.FixedVersionStrategy
所有已实现的接口:
VersionPathStrategy, VersionStrategy

public class FixedVersionStrategy extends AbstractVersionStrategy
A VersionStrategy that relies on a fixed version applied as a request path prefix, e.g. reduced SHA, version name, release date, etc.

This is useful for example when ContentVersionStrategy cannot be used such as when using JavaScript module loaders which are in charge of loading the JavaScript resources and need to know their relative paths.

从以下版本开始:
4.0
作者:
Brian Clozel, Rossen Stoyanchev
另请参阅:
  • 字段详细资料

    • version

      private final String version
  • 构造器详细资料

    • FixedVersionStrategy

      public FixedVersionStrategy(String version)
      Create a new FixedVersionStrategy with the given version string.
      参数:
      version - the fixed version string to use
  • 方法详细资料

    • getResourceVersion

      public String getResourceVersion(cn.taketoday.core.io.Resource resource)
      从接口复制的说明: VersionStrategy
      Determine the version for the given resource.
      参数:
      resource - the resource to check
      返回:
      the version (never null)