Package org.springframework.web.servlet.resource

Examples of org.springframework.web.servlet.resource.CssLinkResourceTransformer


  protected List<ResourceTransformer> getResourceTransformers() {
    if (this.hasVersionResolver  && !this.hasCssLinkTransformer) {
      List<ResourceTransformer> result = new ArrayList<ResourceTransformer>(this.transformers);
      boolean hasTransformers = !this.transformers.isEmpty();
      boolean hasCaching = hasTransformers && this.transformers.get(0) instanceof CachingResourceTransformer;
      result.add(hasCaching ? 1 : 0, new CssLinkResourceTransformer());
      return result;
    }
    return this.transformers;
  }
View Full Code Here


    CachingResourceResolver cachingResolver = Mockito.mock(CachingResourceResolver.class);
    VersionResourceResolver versionResolver = Mockito.mock(VersionResourceResolver.class);
    PathResourceResolver pathResourceResolver = new PathResourceResolver();
    CachingResourceTransformer cachingTransformer = Mockito.mock(CachingResourceTransformer.class);
    AppCacheManifestTransformer appCacheTransformer = Mockito.mock(AppCacheManifestTransformer.class);
    CssLinkResourceTransformer cssLinkTransformer = new CssLinkResourceTransformer();

    this.registration.setCachePeriod(3600)
        .resourceChain(false)
          .addResolver(cachingResolver)
          .addResolver(versionResolver)
View Full Code Here

TOP

Related Classes of org.springframework.web.servlet.resource.CssLinkResourceTransformer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.