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

FixedVersionStrategy

open class FixedVersionStrategy : AbstractPrefixVersionStrategy

A VersionStrategy that relies on a fixed version applied as a request path prefix, e.g. reduced SHA, version name, release date, etc.

This is useful for example when ContentVersionStrategy cannot be used such as when using JavaScript module loaders which are in charge of loading the JavaScript resources and need to know their relative paths.

Author
Rossen Stoyanchev

Author
Brian Clozel

Since
5.0

See Also
VersionResourceResolver

Constructors

<init>

FixedVersionStrategy(version: String)

Create a new FixedVersionStrategy with the given version string.

Functions

getResourceVersion

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