ZBLOG

java: Annotation processing is not supported for module cycles. Please ensure that all modules from cycle [data-sync-third-feign,data-sync-common] are excluded from annotation processing

这个错误提示意味着在你的代码中存在一个模块循环依赖,即两个或多个模块相互依赖,导致无法进行注解处理。在Java 9及以上版本中,不支持在循环依赖关系中进行注解处理。

要解决此问题,你需要确保所有涉及到循环依赖关系的模块都从注解处理过程中被排除。可以使用-processorpath选项来排除这些模块。例如,在Maven项目中可以将以下内容添加到pom.xml文件中:

  1. <build>
  2. <plugins>
  3. <plugin>
  4. <groupId>org.apache.maven.plugins</groupId>
  5. <artifactId>maven-compiler-plugin</artifactId>
  6. <configuration>
  7. <annotationProcessorPaths>
  8. <path>
  9. <!-- 指定需要使用的注解处理器 -->
  10. </path>
  11. </annotationProcessorPaths>
  12. <compilerArgs>
  13. <arg>--module-path</arg>
  14. <arg>${project.build.directory}/classes${path.separator}${module.path}</arg>
  15. <!-- 排除循环依赖的模块 -->
  16. <arg>--exclude-modules</arg>
  17. <arg>data-sync-third-feign,data-sync-common</arg>
  18. </compilerArgs>
  19. </configuration>
  20. </plugin>
  21. </plugins>
  22. </build>

请注意,上述示例仅适用于Maven项目,并且需要根据实际情况进行调整。如果你使用其他构建工具,则需要查找相应的选项和配置。

本站部分文章来源于网络,版权归原作者所有,如有侵权请联系站长删除。
转载请注明出处:https://golang.0voice.com/?id=3060

分享:
扫描分享到社交APP
上一篇
下一篇
发表列表
游客 游客
此处应有掌声~
评论列表

还没有评论,快来说点什么吧~

联系我们

在线咨询: 点击这里给我发消息

微信号:3007537140

上班时间: 10:30-22:30

关注我们
x

注册

已经有帐号?