spring-framework / org.springframework.web.reactive.resource / AbstractFileNameVersionStrategy

AbstractFileNameVersionStrategy

abstract class AbstractFileNameVersionStrategy : VersionStrategy

Abstract base class for filename suffix based VersionStrategy implementations, e.g. "static/myresource-version.js"

Author
Rossen Stoyanchev

Author
Brian Clozel

Since
5.0

Constructors

<init>

AbstractFileNameVersionStrategy()

Abstract base class for filename suffix based VersionStrategy implementations, e.g. "static/myresource-version.js"

Functions

addVersion

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

extractVersion

open fun extractVersion(requestPath: String): String

removeVersion

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

Inherited Functions

getResourceVersion

abstract fun getResourceVersion(resource: Resource): Mono<String>

Determine the version for the given resource.

Inheritors

ContentVersionStrategy

open class ContentVersionStrategy : AbstractFileNameVersionStrategy

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".