[英]Updating my spring version prevents gradle resolving spring-boot-starter
我有一个春季启动项目。 尝试启动应用程序时出现以下问题。
java.lang.IllegalStateException: ApplicationEventMulticaster not initialized - call 'refresh' before multicasting events via the context: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@78b1cc93: startup date [Mon Nov 06 13:01:13 UTC 2017]; root of context hierarchy
在我的研究中,我发现了一个错误报告,听起来像我的问题。
https://jira.spring.io/browse/SPR-16149
问题似乎是某种较低级别的异常,无法正确处理。 从外观上看,这是一个例外,不应在用户空间中看到。 也有一个解决方法。 大! 我对该修复程序进行了更多研究,结果发现您可以独立于sprig boot来升级spring版本。 我已将以下内容应用于我的build.gradle
ext['spring.version'] = '4.3.13.RELEASE'
但是,当我尝试使用此新版本启动应用程序时,会得到以下信息。
gradle@2eb4803b9c11:/app$ gradle bootRun
FAILURE: Build failed with an exception.
* What went wrong:
Could not resolve all files for configuration ':compileClasspath'.
> Could not find org.springframework.boot:spring-boot-starter:.
Searched in the following locations:
https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-starter//spring-boot-starter-.pom
https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-starter//spring-boot-starter-.jar
https://repo.spring.io/libs-milestone/org/springframework/boot/spring-boot-starter//spring-boot-starter-.pom
https://repo.spring.io/libs-milestone/org/springframework/boot/spring-boot-starter//spring-boot-starter-.jar
Required by:
project :
> Could not find org.springframework.boot:spring-boot-starter-web:.
Required by:
project :
> Could not find org.springframework.boot:spring-boot-starter-data-jpa:.
Required by:
project :
> Could not find org.springframework.cloud:spring-cloud-starter-stream-rabbit:.
Required by:
project :
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 7s
1 actionable task: 1 executed
看来我的项目无法再解决spring-boot-starter了。 我读得正确吗? 为什么我不能更新spring版本并使用spring boot的现有版本? 它们有什么关系?
Maven中央存储库中没有可用的4.3.13.RELEASE
版本。 spring的最新版本是5.0.1.RELEASE
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.