由于测试依赖关系,java Gradle Spring云流项目未生成
当我尝试使用Spring Cloud Stream构建Gradle Spring启动项目时,我收到以下错误:
Execution failed for task ':compileTestJava'.
> Could not resolve all files for configuration ':testCompileClasspath'.
> Could not find org.springframework.cloud:spring-cloud-stream:test-binder.
Required by:
project :
> Could not find org.springframework.cloud:spring-cloud-stream:test-binder.
Required by:
project :
> Could not find org.springframework.cloud:spring-cloud-stream:test-binder.
Required by:
project : > org.springframework.cloud:spring-cloud-stream-binder-kafka-streams:3.0.9.RELEASE > org.springframework.cloud:spring-cloud-stream-binder-kafka-core:3.0.9.RELEASE
如果删除以下依赖项,则项目可以正常工作:
testImplementation 'org.springframework.cloud:spring-cloud-stream:test-binder@test-jar'
该项目是使用Spring initilizr和这个configuration生成的
为了使项目成功构建,我可以更改哪些内容
# 1 楼答案
改变
到
目前,Spring Initializer生成带有此错误的Gradle项目,问题记录在#1159和中 #591