Class ReactiveLoadBalancerApiVersionStrategy
java.lang.Object
org.springframework.web.reactive.accept.DefaultApiVersionStrategy
org.springframework.cloud.loadbalancer.core.ReactiveLoadBalancerApiVersionStrategy
- All Implemented Interfaces:
org.springframework.web.reactive.accept.ApiVersionStrategy
public class ReactiveLoadBalancerApiVersionStrategy
extends org.springframework.web.reactive.accept.DefaultApiVersionStrategy
A LoadBalancer-specific implementation of
DefaultApiVersionStrategy. It
overrides the
DefaultApiVersionStrategy.validateVersion(Comparable, ServerWebExchange) method
in order to skip any version validation.- Since:
- 5.0.0
- Author:
- Olga Maciaszek-Sharma
-
Constructor Summary
ConstructorsConstructorDescriptionReactiveLoadBalancerApiVersionStrategy(List<org.springframework.web.reactive.accept.ApiVersionResolver> versionResolvers, @Nullable org.springframework.web.accept.ApiVersionParser<?> versionParser, boolean versionRequired, @Nullable String defaultVersion, boolean detectSupportedVersions, @Nullable Predicate<Comparable<?>> supportedVersionPredicate, @Nullable org.springframework.web.reactive.accept.ApiVersionDeprecationHandler deprecationHandler) -
Method Summary
Modifier and TypeMethodDescriptionvoidvalidateVersion(@Nullable Comparable<?> requestVersion, org.springframework.web.server.ServerWebExchange exchange) Methods inherited from class org.springframework.web.reactive.accept.DefaultApiVersionStrategy
addMappedVersion, addSupportedVersion, detectSupportedVersions, getDefaultVersion, handleDeprecations, parseVersion, resolveVersion, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.web.reactive.accept.ApiVersionStrategy
resolveParseAndValidateVersion
-
Constructor Details
-
ReactiveLoadBalancerApiVersionStrategy
public ReactiveLoadBalancerApiVersionStrategy(List<org.springframework.web.reactive.accept.ApiVersionResolver> versionResolvers, @Nullable org.springframework.web.accept.ApiVersionParser<?> versionParser, boolean versionRequired, @Nullable String defaultVersion, boolean detectSupportedVersions, @Nullable Predicate<Comparable<?>> supportedVersionPredicate, @Nullable org.springframework.web.reactive.accept.ApiVersionDeprecationHandler deprecationHandler)
-
-
Method Details
-
validateVersion
public void validateVersion(@Nullable Comparable<?> requestVersion, org.springframework.web.server.ServerWebExchange exchange) throws org.springframework.web.accept.MissingApiVersionException, org.springframework.web.accept.InvalidApiVersionException - Specified by:
validateVersionin interfaceorg.springframework.web.reactive.accept.ApiVersionStrategy- Overrides:
validateVersionin classorg.springframework.web.reactive.accept.DefaultApiVersionStrategy- Throws:
org.springframework.web.accept.MissingApiVersionExceptionorg.springframework.web.accept.InvalidApiVersionException
-