我有一个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在我的研究中,我发现了一个听起来和我的问题一模一样的bug报告。
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版本?它们是如何相关的?
发布于 2017-11-07 10:06:37
在maven中央存储库中没有可用的4.3.13.RELEASE版本。spring的最新版本是5.0.1.RELEASE。
https://stackoverflow.com/questions/47137828
复制相似问题