spring5.0.x源码编译完后,spring-beans项目运行compileTestJava报循环依赖错误,怎么解决?

qq_42283110 2019-10-19 03:03:52

Circular dependency between the following tasks:
:spring-beans:compileGroovy
\--- :spring-beans:compileJava
\--- :spring-beans:compileKotlin
\--- :spring-beans:compileGroovy (*)
...全文
1511 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
Life_wy 2021-12-13
  • 打赏
  • 举报
回复

先编译spring-beans->tasks->other->compileGroovy,再编译oxm

wjheha 2021-01-02
  • 打赏
  • 举报
回复
// 从master分支copy的代码 tasks.named('compileGroovy') { // Groovy only needs the declared dependencies (and not the result of Java compilation) classpath = sourceSets.main.compileClasspath } tasks.named('compileKotlin') { // Kotlin also depends on the result of Groovy compilation classpath += files(sourceSets.main.groovy.classesDirectory) }
  • 打赏
  • 举报
回复
引用 3 楼 wxwrjgcs 的回复:
同问 我也遇到了 注释掉了spring-beans 里的 ,有解决吗?网上看到有3行都加注释,又会报错/spring-beans/src/main/kotlin/org/springframework/beans/factory/ListableBeanFactoryExtensions.kt: (67, 37): Unresolved reference: ListableBeanFactory
同问 怎么解决啊?
真正的张起灵 2020-03-30
  • 打赏
  • 举报
回复 1
引用 6 楼 Zzzj_1233 的回复:
修改spring-beans.spring-beans.gradle文件 修改最后三行为如下:

def deps = compileGroovy.taskDependencies.immutableValues + compileGroovy.taskDependencies.mutableValues
compileGroovy.dependsOn = deps - "compileJava"
compileKotlin.dependsOn(compileGroovy)
compileKotlin.classpath += files(compileGroovy.destinationDir)
不错不错,你这个是对的
Zzzj_1233 2020-03-30
  • 打赏
  • 举报
回复 1
修改spring-beans.spring-beans.gradle文件 修改最后三行为如下:

def deps = compileGroovy.taskDependencies.immutableValues + compileGroovy.taskDependencies.mutableValues
compileGroovy.dependsOn = deps - "compileJava"
compileKotlin.dependsOn(compileGroovy)
compileKotlin.classpath += files(compileGroovy.destinationDir)
wxwrjgcs 2020-03-15
  • 打赏
  • 举报
回复
同问 我也遇到了 注释掉了spring-beans 里的 ,有解决吗?网上看到有3行都加注释,又会报错/spring-beans/src/main/kotlin/org/springframework/beans/factory/ListableBeanFactoryExtensions.kt: (67, 37): Unresolved reference: ListableBeanFactory
烟花易冷xyh 2020-03-15
  • 打赏
  • 举报
回复
Circular dependency between the following tasks: :spring-beans:compileGroovy \--- :spring-beans:compileJava \--- :spring-beans:compileKotlin \--- :spring-beans:compileGroovy (*) 一样的错误 你们怎么解决的啊
Tiangel5310 2019-11-17
  • 打赏
  • 举报
回复
同问 我也遇到了 注释掉了spring-beans 里的 也不行为啥呀
内容概要:本文提出一种基于鱼鹰优化算法(OOA)优化的CNN-BiGUR-Attention混合模型,用于提升短期风电功率预测的精度与稳定性,采用Matlab实现代码仿真。该模型融合卷积神经网络(CNN)提取输入数据的局部空间特征,利用双向门控循环单元(BiGUR)捕捉风速、功率等时间序列的前后向动态依赖关系,并引入注意力机制自适应强化关键时间步的特征权重,从而增强模型对非平稳风电数据的表征能力;进一步,采用OOA算法对模型超参数进行全局寻优,有效提升模型收敛速度与泛化性能。研究基于实际风电场历史数据开展实验验证,结果表明,该方法相较传统模型在预测精度、鲁棒性和误差抑制方面表现更优,适用于高比例可再生能源接入背景下的电力系统调度需求。; 适合人群:从事新能源发电预测、电力系统优化调度、智能算法与深度学习融合应用等方向的科研人员及工程技术人员,尤其适合具备Matlab编程能力、熟悉时间序列建模与深度学习框架的研究者。; 使用场景及目标:①实现风电场短期功率高精度预测,支撑电网安全稳定调度与能量管理;②为深度学习模型结构设计与智能优化算法联合调参提供实践范例;③推动人工智能技术在可再生能源预测、智能电网运行等领域的落地应用。; 阅读建议:建议结合提供的Matlab代码深入理解CNN-BiGUR-Attention网络架构搭建、注意力机制实现方式及OOA优化流程,重点关注数据预处理、模型训练与参数调优细节,可通过替换不同风电数据集进行对比实验,进一步掌握模型迁移能力与适应性。

51,409

社区成员

发帖
与我相关
我的任务
社区描述
Java相关技术讨论
javaspring bootspring cloud 技术论坛(原bbs)
社区管理员
  • Java相关社区
  • 小虚竹
  • 谙忆
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧