spring-framework / org.springframework.web.servlet.resource / ContentVersionStrategy

ContentVersionStrategy

open class ContentVersionStrategy : AbstractVersionStrategy

A VersionStrategy that calculates an Hex MD5 hashes from the content of the resource and appends it to the file name, e.g. "styles/main-e36d2e05253c6c7085a91522ce43a0b4.css".

Author
Brian Clozel

Author
Rossen Stoyanchev

Since
4.1

See Also
VersionResourceResolver

Constructors

<init>

ContentVersionStrategy()

Functions

getResourceVersion

open fun getResourceVersion(resource: Resource): String

Inherited Functions

addVersion

open fun addVersion(requestPath: String, version: String): String

extractVersion

open fun extractVersion(requestPath: String): String

getVersionPathStrategy

open fun getVersionPathStrategy(): VersionPathStrategy

removeVersion

open fun removeVersion(requestPath: String, version: String): String