springboot报错:Annotation processing is not supported for module cycles. Please ensure that all module

报错

Error:java: Annotation processing is not supported for module cycles. Please ensure that all modules from cycle [changgou-common,changgou-service-user-api] are excluded from annotation processing

从字面意思理解,也就是changgou-common,changgou-service-user-api两个模块之间互相依赖,在进行Annotation处理时,形成了死循环。

解决方案

从字面意思来看,可能是pom文件中,两个模块进行了相互引用(我印象里没有),经过检查,这两个模块的pom文件中确实不存在相互引用。

查找了一个解决方案,解决问题:
1.进行模块之间依赖的分析springboot报错:Annotation processing is not supported for module cycles. Please ensure that all module_第1张图片
2.如果两个模块间存在依赖死循环,会出现标红提示(我不想再复现bug,借用别人的图了)springboot报错:Annotation processing is not supported for module cycles. Please ensure that all module_第2张图片
3.点击这两个标红的模块,然后对模块进行重新设置
springboot报错:Annotation processing is not supported for module cycles. Please ensure that all module_第3张图片
4.删除掉不需要的模块,也就是将两个模块之间的依赖删除掉。changgou-common中删除掉changgou-service-user-api,changgou-service-user-api中删除掉changgou-common。即可
springboot报错:Annotation processing is not supported for module cycles. Please ensure that all module_第4张图片

参考链接

https://www.cnblogs.com/panpanshen/p/9668058.html

你可能感兴趣的:(java踩坑,java,maven)