gpt4 book ai didi

java - 更新我的spring版本会阻止gradle解决spring-boot-starter

转载 作者:行者123 更新时间:2023-12-03 05:52:13 25 4
gpt4 key购买 nike

我有一个 Spring 启动项目。尝试启动应用程序时出现以下问题。

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

问题似乎是某种较低级别的异常,无法正确处理。从外观上看,这是一个异常(exception),不应在用户空间中看到。也有一个解决方法。大!我对该修复程序进行了更多研究,结果发现您可以独立于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

关于java - 更新我的spring版本会阻止gradle解决spring-boot-starter,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47137828/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com