http://vertx.io/docs/vertx-service-proxy/java/
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-service-proxy</artifactId>
<version>3.5.0</version>
<classifier>processor</classifier>
</dependency>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessors>
<annotationProcessor>io.vertx.serviceproxy.ServiceProxyProcessor</annotationProcessor>
</annotationProcessors>
</configuration>
</plugin>
ServiceProxyProcessor
可从IDE解析我想念什么吗?
[错误]编译错误:
[INFO] ----------------------------------------------- --------------
[错误]找不到注释处理器“ io.vertx.serviceproxy.ServiceProxyProcessor”
-
我仍然可以做到
<plugin>
<groupId>org.bsc.maven</groupId>
<artifactId>maven-processor-plugin</artifactId>
<version>3.3.2</version>
<executions>
<execution>
<id>process</id>
<goals>
<goal>process</goal> <!-- see the "vertx-service-proxy" -->
</goals>
<!-- http://maven.apache.org/ref/3.5.0/maven-core/lifecycles.html -->
<phase>generate-sources</phase>
<configuration>
<!-- source output directory -->
<outputDirectory>src/main/generated</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
不指定
ServiceProxyProcessor
但是我不确定这样做是否正确,因为它不在文档中。
最佳答案
您不需要配置编译器插件,pom的工作示例可能是:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-core</artifactId>
<version>3.5.0</version>
</dependency>
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-service-proxy</artifactId>
<version>3.5.0</version>
</dependency>
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-codegen</artifactId>
<version>3.5.0</version>
</dependency>
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-service-proxy</artifactId>
<version>3.5.0</version>
<scope>provided</scope>
<classifier>processor</classifier>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
关于java - 找不到注释处理器“io.vertx.serviceproxy.ServiceProxyProcessor”,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/47342453/