@Singleton @Requires(beans={RoutesVersioningConfiguration.class,ParameterVersionResolverConfiguration.class}) public class ParameterVersionResolver extends Object implements RequestVersionResolver
RequestVersionResolver
responsible for extracting version from HttpParameters
.Constructor and Description |
---|
ParameterVersionResolver(ParameterVersionResolverConfiguration configuration)
Creates a
RequestVersionResolver to extract version from request parameter. |
Modifier and Type | Method and Description |
---|---|
Optional<String> |
resolve(HttpRequest<?> request)
Resolves a version from a given object.
|
@Inject public ParameterVersionResolver(ParameterVersionResolverConfiguration configuration)
RequestVersionResolver
to extract version from request parameter.configuration
- A configuration to pick correct request parameter names.public Optional<String> resolve(HttpRequest<?> request)
VersionResolver
resolve
in interface VersionResolver<HttpRequest<?>,String>
request
- The type of object to resolve from