Vertx在Quarkus vertx munity Web客户端扩展中不可用

时间:2020-06-02 12:02:44

标签: reactive-programming vert.x quarkus quarkus-rest-client smallrye

我试图测试vertx munity Web客户端提供的反应式Web客户端。

我遵循了官方指南Quarkus - Getting Started with Reactive

并在依赖项中添加了以下内容。

        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-resteasy</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-resteasy-jsonb</artifactId>
        </dependency>
        <dependency>
            <groupId>io.smallrye.reactive</groupId>
            <artifactId>smallrye-mutiny-vertx-web-client</artifactId>
        </dependency>

但是当我按照文章中所述注入Vertx并得到CDI不满意的依赖项异常时。 Vertx不可用。

Caused by: javax.enterprise.inject.UnsatisfiedResolutionException: Unsatisfied dependency for type io.vertx.mutiny.core.Vertx and qualifiers [@Default]
        - java member: com.example.PostResourceClient#vertx

完整代码为here

1 个答案:

答案 0 :(得分:6)

您需要将io.quarkus:quarkus-vertx依赖项添加到POM才能激活Vertx扩展名。 io.smallrye.reactive:smallrye-mutiny-vertx-web-client是不会激活任何扩展名的外部依赖项。

相关问题