为什么Vert.x代码生成器无法创建RxJava类?

3

由于某些原因,我的基于4.0.2版本的代码在使用代码生成时没有生成rx-fied服务版本。

但是VertxEBProxy类和VertxProxyHandler类都已按预期创建。

这是一个演示项目:https://github.com/ashertarno/playground

请参见以下所需依赖项:

implementation "io.vertx:vertx-core:$vertxVersion"
implementation "io.vertx:vertx-rx-java2:$vertxVersion"
implementation "io.vertx:vertx-codegen:$vertxVersion"
implementation "io.vertx:vertx-service-proxy:$vertxVersion"
implementation "io.vertx:vertx-rx-java2-gen:$vertxVersion"

annotationProcessor "io.vertx:vertx-codegen:$vertxVersion:processor"
annotationProcessor "io.vertx:vertx-service-proxy:$vertxVersion"

在这种情况下会缺少什么?
1个回答

2

您需要将io.vertx: vertx-rx-java2-gen:$vertxVersion 添加为annotationProcessortestAnnotationProcessor。在我这样做后,类已经被生成:

./build/classes/java/main/me/tarno/playground/reactivex/BaseServiceProxy.class
./build/classes/java/test/me/tarno/playground/reactivex/TestProxy.class

1
不错的发现。实际上我尝试过这个,但现在我看到我愚蠢地将“processor”复制粘贴到了它里面,所以它没有起作用。 - atarno

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接