Search in sources :

Example 1 with FixedVersionStrategy

use of org.springframework.web.servlet.resource.FixedVersionStrategy in project ORCID-Source by ORCID.

the class ResourceHandlersConfiguration method addResourceHandlers.

@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
    String releaseVersion = ReleaseNameUtils.getReleaseName();
    VersionResourceResolver versionResourceResolver = new VersionResourceResolver().addVersionStrategy(new FixedVersionStrategy(releaseVersion), "/**");
    registry.addResourceHandler("/static/**").addResourceLocations("/static/").setCachePeriod(1206297260).resourceChain(true).addResolver(versionResourceResolver);
}
Also used : FixedVersionStrategy(org.springframework.web.servlet.resource.FixedVersionStrategy) VersionResourceResolver(org.springframework.web.servlet.resource.VersionResourceResolver)

Aggregations

FixedVersionStrategy (org.springframework.web.servlet.resource.FixedVersionStrategy)1 VersionResourceResolver (org.springframework.web.servlet.resource.VersionResourceResolver)1