类 CssLinkResourceTransformer
java.lang.Object
cn.taketoday.web.resource.ResourceTransformerSupport
cn.taketoday.web.resource.CssLinkResourceTransformer
- 所有已实现的接口:
ResourceTransformer
A
ResourceTransformer implementation that modifies links in a CSS
file to match the public URL paths that should be exposed to clients (e.g.
with an MD5 content-based hash inserted in the URL).
The implementation looks for links in CSS @import statements and
also inside CSS url() functions. All links are then passed through the
ResourceResolvingChain and resolved relative to the location of the
containing CSS file. If successfully resolved, the link is modified, otherwise
the original link is preserved.
- 从以下版本开始:
- 4.0
- 作者:
- Rossen Stoyanchev
-
嵌套类概要
嵌套类修饰符和类型类说明protected static classAbstract base class forCssLinkResourceTransformer.LinkParserimplementations.private static classprivate static classprotected static interfaceExtract content chunks that represent links.private static class -
字段概要
字段修饰符和类型字段说明private static final Charsetprivate final List<CssLinkResourceTransformer.LinkParser>private static final cn.taketoday.logging.Logger -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明private booleancn.taketoday.core.io.Resourcetransform(RequestContext request, cn.taketoday.core.io.Resource resource, ResourceTransformerChain transformerChain) Transform the given resource.从类继承的方法 cn.taketoday.web.resource.ResourceTransformerSupport
getResourceUrlProvider, resolveUrlPath, setResourceUrlProvider, toAbsolutePath
-
字段详细资料
-
DEFAULT_CHARSET
-
logger
private static final cn.taketoday.logging.Logger logger -
linkParsers
-
-
构造器详细资料
-
CssLinkResourceTransformer
public CssLinkResourceTransformer()
-
-
方法详细资料
-
transform
public cn.taketoday.core.io.Resource transform(RequestContext request, cn.taketoday.core.io.Resource resource, ResourceTransformerChain transformerChain) throws IOException 从接口复制的说明:ResourceTransformerTransform the given resource.- 参数:
request- the current requestresource- the resource to transformtransformerChain- the chain of remaining transformers to delegate to- 返回:
- the transformed resource (never
null) - 抛出:
IOException- if the transformation fails
-
hasScheme
-