Is it possible to use Ribbon and Eureka service discovery with spring webflux webclient?
I tried this code but getting an error during integration test.
reactor.core.Exceptions$ErrorCallbackNotImplemented: java.lang.IllegalArgumentException: URI is not absolute: /auth-service/auth-service/validate-manager-client-access
@Bean
@LoadBalanced
public WebClient loadBalancedWebClient() {
return WebClient.create(baseURL);
}
@Override
public Mono<Boolean> validateManagerClientAccess(Mono<LoginDTO> loginDTOMono) {
return webClient
.post()
.uri(validateManagerURL)
.body(loginDTOMono, LoginDTO.class)
.retrieve()
.bodyToMono(Boolean.class);
}
# Remote Services Configuration
remote:
auth-service:
service-id: auth-service
path:
validate-manager-client-access: /auth-service/validate-manager-client-access