Class AbstractVersionStrategy.FileNameVersionPathStrategy
java.lang.Object
org.springframework.web.servlet.resource.AbstractVersionStrategy.FileNameVersionPathStrategy
- All Implemented Interfaces:
- VersionPathStrategy
- Enclosing class:
- AbstractVersionStrategy
protected static class AbstractVersionStrategy.FileNameVersionPathStrategy
extends Object
implements VersionPathStrategy
File name-based 
VersionPathStrategy,
 for example, "path/foo-{version}.css".- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionaddVersion(String requestPath, String version) Add a version to the given request path.extractVersion(String requestPath) Extract the resource version from the request path.removeVersion(String requestPath, String version) Remove the version from the request path.
- 
Constructor Details- 
FileNameVersionPathStrategyprotected FileNameVersionPathStrategy()
 
- 
- 
Method Details- 
extractVersionDescription copied from interface:VersionPathStrategyExtract the resource version from the request path.- Specified by:
- extractVersionin interface- VersionPathStrategy
- Parameters:
- requestPath- the request path to check
- Returns:
- the version string or nullif none was found
 
- 
removeVersionDescription copied from interface:VersionPathStrategyRemove the version from the request path. It is assumed that the given version was extracted viaVersionPathStrategy.extractVersion(String).- Specified by:
- removeVersionin interface- VersionPathStrategy
- Parameters:
- requestPath- the request path of the resource being resolved
- version- the version obtained from- VersionPathStrategy.extractVersion(String)
- Returns:
- the request path with the version removed
 
- 
addVersionDescription copied from interface:VersionPathStrategyAdd a version to the given request path.- Specified by:
- addVersionin interface- VersionPathStrategy
- Parameters:
- requestPath- the requestPath
- version- the version
- Returns:
- the requestPath updated with a version string
 
 
-