[英]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.