接口 ResourceTransformer

所有已知实现类:
CachingResourceTransformer, CssLinkResourceTransformer, ResourceTransformerSupport
函数接口:
这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。

@FunctionalInterface public interface ResourceTransformer
An abstraction for transforming the content of a resource.
从以下版本开始:
4.0
作者:
Jeremy Grelle, Rossen Stoyanchev
  • 方法概要

    修饰符和类型
    方法
    说明
    cn.taketoday.core.io.Resource
    transform(RequestContext request, cn.taketoday.core.io.Resource resource, ResourceTransformerChain transformerChain)
    Transform the given resource.
  • 方法详细资料

    • transform

      cn.taketoday.core.io.Resource transform(RequestContext request, cn.taketoday.core.io.Resource resource, ResourceTransformerChain transformerChain) throws IOException
      Transform the given resource.
      参数:
      request - the current request
      resource - the resource to transform
      transformerChain - the chain of remaining transformers to delegate to
      返回:
      the transformed resource (never null)
      抛出:
      IOException - if the transformation fails