public interface VersionStrategy
VersionResourceResolver.VersionResourceResolver| Modifier and Type | Method and Description |
|---|---|
String |
addVersionToUrl(String baseUrl,
List<? extends org.springframework.core.io.Resource> locations,
ResourceResolverChain chain)
Adds a version string to the given baseUrl.
|
String |
deleteVersionFromPath(String requestPath,
String candidateVersion)
Deletes the given candidate version string from the given request path.
|
String |
extractVersionFromPath(String requestPath)
Extracts a version string from the request path.
|
boolean |
resourceVersionMatches(org.springframework.core.io.Resource baseResource,
String candidateVersion)
Checks whether the given
Resource matches the candidate version string. |
String extractVersionFromPath(String requestPath)
requestPath - the request path of the resource being resolvedString deleteVersionFromPath(String requestPath, String candidateVersion)
requestPath - the request path of the resource being resolvedcandidateVersion - the candidate version stringboolean resourceVersionMatches(org.springframework.core.io.Resource baseResource,
String candidateVersion)
Resource matches the candidate version string.
Useful when the version string is managed on a per-resource basis.baseResource - the resource to check against the given versioncandidateVersion - the candidate version for the given resourceString addVersionToUrl(String baseUrl, List<? extends org.springframework.core.io.Resource> locations, ResourceResolverChain chain)
baseUrl - the baseUrl of the requested resourcelocations - the resource locations to resolve resources fromchain - the chain of resource resolvers