我有一个spring-boot项目。当我尝试启动应用程序时,我遇到了以下问题。
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。我读得对吗?为什么我不能更新我的弹簧版本并使用现有版本的弹簧靴?它们有什么关系?
答案 0 :(得分:0)
maven中央存储库中没有4.3.13.RELEASE
版本。最新版本的spring是5.0.1.RELEASE
。