Class BlockingLoadBalancerApiVersionStrategy
java.lang.Object
org.springframework.web.accept.DefaultApiVersionStrategy
org.springframework.cloud.loadbalancer.core.BlockingLoadBalancerApiVersionStrategy
- All Implemented Interfaces:
org.springframework.web.accept.ApiVersionStrategy
public class BlockingLoadBalancerApiVersionStrategy
extends org.springframework.web.accept.DefaultApiVersionStrategy
A LoadBalancer-specific implementation of
DefaultApiVersionStrategy. It
overrides the
DefaultApiVersionStrategy.validateVersion(Comparable, HttpServletRequest)
method in order to skip any version validation.- Since:
- 5.0.0
- Author:
- Olga Maciaszek-Sharma
-
Constructor Summary
ConstructorsConstructorDescriptionBlockingLoadBalancerApiVersionStrategy(List<org.springframework.web.accept.ApiVersionResolver> versionResolvers, @Nullable org.springframework.web.accept.ApiVersionParser<?> versionParser, @Nullable Boolean versionRequired, @Nullable String defaultVersion, boolean detectSupportedVersions, @Nullable Predicate<Comparable<?>> supportedVersionPredicate, @Nullable org.springframework.web.accept.ApiVersionDeprecationHandler deprecationHandler) -
Method Summary
Modifier and TypeMethodDescriptionvoidvalidateVersion(@Nullable Comparable<?> requestVersion, jakarta.servlet.http.HttpServletRequest request) Methods inherited from class org.springframework.web.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.accept.ApiVersionStrategy
resolveParseAndValidateVersion
-
Constructor Details
-
BlockingLoadBalancerApiVersionStrategy
public BlockingLoadBalancerApiVersionStrategy(List<org.springframework.web.accept.ApiVersionResolver> versionResolvers, @Nullable org.springframework.web.accept.ApiVersionParser<?> versionParser, @Nullable Boolean versionRequired, @Nullable String defaultVersion, boolean detectSupportedVersions, @Nullable Predicate<Comparable<?>> supportedVersionPredicate, @Nullable org.springframework.web.accept.ApiVersionDeprecationHandler deprecationHandler)
-
-
Method Details
-
validateVersion
public void validateVersion(@Nullable Comparable<?> requestVersion, jakarta.servlet.http.HttpServletRequest request) throws org.springframework.web.accept.MissingApiVersionException, org.springframework.web.accept.InvalidApiVersionException - Specified by:
validateVersionin interfaceorg.springframework.web.accept.ApiVersionStrategy- Overrides:
validateVersionin classorg.springframework.web.accept.DefaultApiVersionStrategy- Throws:
org.springframework.web.accept.MissingApiVersionExceptionorg.springframework.web.accept.InvalidApiVersionException
-