Spring Framework CssLinkResourceTransformer - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework CssLinkResourceTransformer class.

This code example shows how to use the following methods:
		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) 
					.addResolver(pathResourceResolver) 
					.addTransformer(cachingTransformer) 
					.addTransformer(appCacheTransformer) 
					.addTransformer(cssLinkTransformer); 
 
		ResourceHttpRequestHandler handler = getHandler("/resources/**"); 
		List<ResourceResolver> resolvers = handler.getResourceResolvers(); 
		assertThat(resolvers.toString(), resolvers, Matchers.hasSize(3)); 
		assertThat(resolvers.get(0), Matchers.sameInstance(cachingResolver)); 

7
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java