Class StandardApiVersionDeprecationHandler.VersionSpec
java.lang.Object
org.springframework.web.reactive.accept.StandardApiVersionDeprecationHandler.VersionSpec
- Enclosing class:
- StandardApiVersionDeprecationHandler
A spec to configure deprecation details for an API version.
- Since:
- 7.0
- Author:
- Rossen Stoyanchev
- 
Method SummaryModifier and TypeMethodDescriptionSpecify a deprecation date for the "Deprecation" response header.setDeprecationLink(URI uri) Specify a URL for the "Link" response header withrel="deprecation"andtype="text/html".setDeprecationLink(URI uri, MediaType mediaType) Variation ofsetDeprecationLink(URI)for use with a media type other than "text/html".setExchangePredicate(Predicate<ServerWebExchange> predicate) Set a predicate to further filter the exchanges to handle.setSunsetDate(ZonedDateTime date) Specify a deprecation date for the "Sunset" response header.setSunsetLink(URI uri) Specify a URL for the "Link" response header withrel="sunset"andtype="text/html".setSunsetLink(URI uri, MediaType mediaType) Variation ofsetSunsetLink(URI)for use with a media type other than "text/html".
- 
Method Details- 
setExchangePredicatepublic StandardApiVersionDeprecationHandler.VersionSpec setExchangePredicate(Predicate<ServerWebExchange> predicate) Set a predicate to further filter the exchanges to handle.By default, all exchanges with the deprecated version are handled. This predicate can help to further narrow down the exchanges that should expose deprecation information. - Parameters:
- predicate- a predicate to check the request with
- Returns:
- the same spec instance
 
- 
setDeprecationDateSpecify a deprecation date for the "Deprecation" response header.- Parameters:
- date- the deprecation date
- Returns:
- the same spec instance
 
- 
setDeprecationLinkSpecify a URL for the "Link" response header withrel="deprecation"andtype="text/html".- Parameters:
- uri- the link value
- Returns:
- the same spec instance
 
- 
setDeprecationLinkpublic StandardApiVersionDeprecationHandler.VersionSpec setDeprecationLink(URI uri, MediaType mediaType) Variation ofsetDeprecationLink(URI)for use with a media type other than "text/html".- Parameters:
- uri- the link value
- mediaType- the media type to use
- Returns:
- the same spec instance
 
- 
setSunsetDateSpecify a deprecation date for the "Sunset" response header.- Parameters:
- date- the sunset date
- Returns:
- the same spec instance
 
- 
setSunsetLinkSpecify a URL for the "Link" response header withrel="sunset"andtype="text/html".- Parameters:
- uri- the link value
- Returns:
- the same spec instance
 
- 
setSunsetLinkVariation ofsetSunsetLink(URI)for use with a media type other than "text/html".- Parameters:
- uri- the link value
- mediaType- the media type to use
- Returns:
- the same spec instance
 
 
-