Class AbstractFileNameVersionStrategy
java.lang.Object
org.springframework.web.reactive.resource.AbstractFileNameVersionStrategy
- All Implemented Interfaces:
- VersionStrategy
- Direct Known Subclasses:
- ContentVersionStrategy
Abstract base class for filename suffix based 
VersionStrategy
implementations, for example, "static/myresource-version.js".- Since:
- 5.0
- Author:
- Rossen Stoyanchev, Brian Clozel
- 
Field SummaryFields
- 
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.Methods inherited from class Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface VersionStrategygetResourceVersion
- 
Field Details- 
loggerprotected final org.apache.commons.logging.Log logger
 
- 
- 
Constructor Details- 
AbstractFileNameVersionStrategypublic AbstractFileNameVersionStrategy()
 
- 
- 
Method Details- 
extractVersionDescription copied from interface:VersionStrategyExtract the resource version from the request path.- Specified by:
- extractVersionin interface- VersionStrategy
- Parameters:
- requestPath- the request path to check
- Returns:
- the version string or nullif none was found
 
- 
removeVersionDescription copied from interface:VersionStrategyRemove the version from the request path. It is assumed that the given version was extracted viaVersionStrategy.extractVersion(String).- Specified by:
- removeVersionin interface- VersionStrategy
- Parameters:
- requestPath- the request path of the resource being resolved
- version- the version obtained from- VersionStrategy.extractVersion(String)
- Returns:
- the request path with the version removed
 
- 
addVersionDescription copied from interface:VersionStrategyAdd a version to the given request path.- Specified by:
- addVersionin interface- VersionStrategy
- Parameters:
- requestPath- the requestPath
- version- the version
- Returns:
- the requestPath updated with a version string
 
 
-