Method threw 'java.lang.IllegalStateException' exception. Cannot evaluate jdk.proxy2.$Proxy134.toString()

492 views Asked by At

Dependencies: spring boot 3.0.4 spring-weblux 6.0.6

I have created the HttpExchange Client:

@HttpExchange("${path.to.baseUrl}")
public interface ExternalClient {

   @PostExchange("${path.to.endpoint}")
   Mono<Object> post(@RequestBody Object object);

}

@Bean
public ExternalClient externalClient(HttpServiceProxyFactory httpServiceProxyFactory) {
    return httpServiceProxyFactory.createClient(ExternalClient.class);
}

@Bean
public HttpServiceProxyFactory httpServiceProxyFactory(WebClient webClient) {
    return HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient))
            .embeddedValueResolver(configurableBeanFactory::resolveEmbeddedValue)
            .build();
}

The created externalClient bean works fine, but in debug mode it returns: Method threw 'java.lang.IllegalStateException' exception. Cannot evaluate jdk.proxy2.$Proxy134.toString()

0

There are 0 answers

Related Questions in ILLEGALSTATEEXCEPTION