类 WebJarsResourceResolver

java.lang.Object
cn.taketoday.web.resource.AbstractResourceResolver
cn.taketoday.web.resource.WebJarsResourceResolver
所有已实现的接口:
ResourceResolver

public class WebJarsResourceResolver extends AbstractResourceResolver
A ResourceResolver that delegates to the chain to locate a resource and then attempts to find a matching versioned resource contained in a WebJar JAR file.

This allows WebJars.org users to write version agnostic paths in their templates, like <script src="/jquery/jquery.min.js"/>. This path will be resolved to the unique version <script src="/jquery/1.2.0/jquery.min.js"/>, which is a better fit for HTTP caching and version management in applications.

This also resolves resources for version agnostic HTTP requests "GET /jquery/jquery.min.js".

This resolver requires the org.webjars:webjars-locator-core library on the classpath and is automatically registered if that library is present.

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

    • WEBJARS_LOCATION

      private static final String WEBJARS_LOCATION
      另请参阅:
    • WEBJARS_LOCATION_LENGTH

      private static final int WEBJARS_LOCATION_LENGTH
    • webJarAssetLocator

      private final org.webjars.WebJarAssetLocator webJarAssetLocator
  • 构造器详细资料

    • WebJarsResourceResolver

      public WebJarsResourceResolver()
      Create a WebJarsResourceResolver with a default WebJarAssetLocator instance.
    • WebJarsResourceResolver

      public WebJarsResourceResolver(org.webjars.WebJarAssetLocator webJarAssetLocator)
      Create a WebJarsResourceResolver with a custom WebJarAssetLocator instance, e.g. with a custom index.
  • 方法详细资料