I am using vert.x extension with Quarkus and I want to subclass the WebClient
@Inject
Vertx vertx;
private CustomWebClient usersApiClient;
@PostConstruct
void initialize() {
this.usersApiClient = (CustomWebClient) WebClient.create(vertx, new WebClientOptions()....)
}
For now the CustomWebClient is empty and just extends the web client
public class CustomWebClient extends io.vertx.mutiny.ext.web.client.WebClient {
But I get a ClassCastException at runtime (in quarkus:dev for instance)
Caused by: java.lang.ClassCastException: class io.vertx.mutiny.ext.web.client.WebClient
cannot be cast to class xxx.CustomWebClient (io.vertx.mutiny.ext.web.client.WebClient is in
unnamed module of loader io.quarkus.bootstrap.classloading.QuarkusClassLoader @760f1081;
xxx.CustomWebClient is in unnamed module of loader.
io.quarkus.bootstrap.classloading.QuarkusClassLoader @55be9b4e)
Do I need to register this class in the class loader or something ?