Package org.springframework.web.servlet.resource

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


    VersionResourceResolver versionResolver = new VersionResourceResolver()
        .addFixedVersionStrategy("fixed", "/**/*.js")
        .addContentVersionStrategy("/**");

    this.registration.resourceChain(true).addResolver(versionResolver)
        .addTransformer(new AppCacheManifestTransformer());

    ResourceHttpRequestHandler handler = getHandler("/resources/**");
    List<ResourceResolver> resolvers = handler.getResourceResolvers();
    assertThat(resolvers.toString(), resolvers, Matchers.hasSize(3));
    assertThat(resolvers.get(0), Matchers.instanceOf(CachingResourceResolver.class));
View Full Code Here


  public void resourceChainWithOverrides() throws Exception {
    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)
View Full Code Here

TOP

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

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.