Class ContentVersionStrategy
java.lang.Object
org.springframework.web.servlet.resource.AbstractVersionStrategy
org.springframework.web.servlet.resource.ContentVersionStrategy
- All Implemented Interfaces:
 VersionPathStrategy, VersionStrategy
A 
VersionStrategy that calculates a Hex MD5 hash from the content
of the resource and appends it to the file name, for example,
"styles/main-e36d2e05253c6c7085a91522ce43a0b4.css".- Since:
 - 4.1
 - Author:
 - Brian Clozel, Rossen Stoyanchev
 - See Also:
 
- 
Nested Class Summary
Nested classes/interfaces inherited from class AbstractVersionStrategy
AbstractVersionStrategy.FileNameVersionPathStrategy, AbstractVersionStrategy.PrefixVersionPathStrategy - 
Field Summary
Fields inherited from class AbstractVersionStrategy
logger - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptiongetResourceVersion(org.springframework.core.io.Resource resource) Determine the version for the given resource.Methods inherited from class AbstractVersionStrategy
addVersion, extractVersion, getVersionPathStrategy, removeVersion 
- 
Constructor Details
- 
ContentVersionStrategy
public ContentVersionStrategy() 
 - 
 - 
Method Details
- 
getResourceVersion
Description copied from interface:VersionStrategyDetermine the version for the given resource.- Parameters:
 resource- the resource to check- Returns:
 - the version (never 
null) 
 
 -