gpt4 book ai didi

java - 未找到注释处理器 'io.vertx.serviceproxy.ServiceProxyProcessor'

转载 作者:行者123 更新时间:2023-12-02 11:59:59 25 4
gpt4 key购买 nike

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 解析

我错过了什么吗?

[错误]编译错误:[信息] ---------------------------------------------------------- --------------[错误]找不到注释处理器“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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com