class ServiceClientFactoryArgumentResolver implements ArgumentResolver {

    @Override
    public Optional<Object> resolve(ArgumentResolverContext context) {
        if (context.parameterTypeEquals(ServiceClientFactory.class)) {
            return Optional.of(context.getHandlerInput().getServiceClientFactory());
        }
        return Optional.empty();
    }

}