Class PathApiVersionResolver
java.lang.Object
org.springframework.web.reactive.accept.PathApiVersionResolver
- All Implemented Interfaces:
ApiVersionResolver
ApiVersionResolver
that extract the version from a path segment.- Since:
- 7.0
- Author:
- Rossen Stoyanchev
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionresolveVersion
(ServerWebExchange exchange) Resolve the version for the given exchange.
-
Constructor Details
-
PathApiVersionResolver
public PathApiVersionResolver(int pathSegmentIndex) Create a resolver instance.- Parameters:
pathSegmentIndex
- the index of the path segment that contains the API version
-
-
Method Details
-
resolveVersion
Description copied from interface:ApiVersionResolver
Resolve the version for the given exchange.- Specified by:
resolveVersion
in interfaceApiVersionResolver
- Parameters:
exchange
- the current exchange- Returns:
- the version value, or
null
if not found
-