org.springframework.web.reactive.resource

## Class ContentVersionStrategy

- java.lang.Object
- - org.springframework.web.reactive.resource.AbstractFileNameVersionStrategy
  - - org.springframework.web.reactive.resource.ContentVersionStrategy

All Implemented Interfaces:
  VersionStrategy

    public class ContentVersionStrategy
    extends 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"`.

Since:
  5.0
Author:
  Rossen Stoyanchev, Brian Clozel
See Also:
  `VersionResourceResolver`

### Field Summary

### Fields inherited from class org.springframework.web.reactive.resource.AbstractFileNameVersionStrategy

`logger`

### Constructor Summary

Constructors
Constructor and Description
`ContentVersionStrategy()`

### Method Summary

All Methods Instance Methods Concrete Methods
`reactor.core.publisher.Mono<String>` `getResourceVersion(org.springframework.core.io.Resource resource)` Determine the version for the given resource.

### Methods inherited from class org.springframework.web.reactive.resource.AbstractFileNameVersionStrategy

`addVersion, extractVersion, removeVersion`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ContentVersionStrategy

    public ContentVersionStrategy()

### Method Detail

#### getResourceVersion

    public reactor.core.publisher.Mono<String> getResourceVersion(org.springframework.core.io.Resource resource)

Description copied from interface: `VersionStrategy`
Determine the version for the given resource.

Parameters:
  `resource` - the resource to check
Returns:
  the resource version