首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >更新我的spring版本会阻止gradle解析spring-boot-starter

更新我的spring版本会阻止gradle解析spring-boot-starter
EN

Stack Overflow用户
提问于 2017-11-06 21:12:50
回答 1查看 342关注 0票数 0

我有一个spring-boot项目。当我尝试启动应用程序时,我遇到了以下问题。

代码语言:javascript
复制
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中

代码语言:javascript
复制
ext['spring.version'] = '4.3.13.RELEASE'

但是,当我尝试用这个新版本启动应用程序时,我得到了以下信息。

代码语言:javascript
复制
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版本?它们是如何相关的?

EN

回答 1

Stack Overflow用户

发布于 2017-11-07 10:06:37

在maven中央存储库中没有可用的4.3.13.RELEASE版本。spring的最新版本是5.0.1.RELEASE

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/47137828

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档