IDEA热布署报错java.lang.IllegalStateException: Restarter has not been initialized
生活随笔
收集整理的這篇文章主要介紹了
IDEA热布署报错java.lang.IllegalStateException: Restarter has not been initialized
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
在IDEA導(dǎo)入devtools依賴實(shí)現(xiàn)熱布署,啟動后遇到如下問題
java.lang.IllegalStateException: Restarter has not been initializedat org.springframework.util.Assert.state(Assert.java:73) ~[spring-core-5.1.5.RELEASE.jar:5.1.5.RELEASE]at org.springframework.boot.devtools.restart.Restarter.getInstance(Restarter.java:543) ~[spring-boot-devtools-1.3.0.RELEASE.jar:1.3.0.RELEASE]at org.springframework.boot.devtools.restart.RestartApplicationListener.onApplicationEvent(RestartApplicationListener.java:50) ~[spring-boot-devtools-1.3.0.RELEASE.jar:1.3.0.RELEASE]at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) [spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE]at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:158) [spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE]at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) [spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE]at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127) [spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE]at org.springframework.boot.context.event.EventPublishingRunListener.failed(EventPublishingRunListener.java:128) [spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE]at org.springframework.boot.SpringApplicationRunListeners.callFailedListener(SpringApplicationRunListeners.java:91) [spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE]at org.springframework.boot.SpringApplicationRunListeners.failed(SpringApplicationRunListeners.java:84) [spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE]at org.springframework.boot.SpringApplication.handleRunFailure(SpringApplication.java:828) [spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE]at org.springframework.boot.SpringApplication.run(SpringApplication.java:327) [spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE]at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260) [spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE]at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248) [spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE]at com.soft1721.jianyue.api.JianyueApiApplication.main(JianyueApiApplication.java:13) [classes/:na]2019-04-26 13:20:33.152 INFO 1220 --- [ main] ConditionEvaluationReportLoggingListener : Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2019-04-26 13:20:33.161 ERROR 1220 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPLICATION FAILED TO START ***************************Description:Binding to target [Bindable@31133b6e type = org.springframework.boot.autoconfigure.web.ResourceProperties, value = 'provided', annotations = array<Annotation>[@org.springframework.boot.context.properties.ConfigurationProperties(prefix=spring.resources, value=spring.resources, ignoreUnknownFields=false, ignoreInvalidFields=false)]] failed:Property: spring.resources.cache-periodValue: 0Origin: "spring.resources.cache-period" from property source "refresh"Reason: The elements [spring.resources.cache-period] were left unbound.Action:Update your application's configurationProcess finished with exit code 1 復(fù)制代碼經(jīng)了解是這個(gè)版本的依賴有問題
直接去掉版本號或者改成下面這樣即可
參考
個(gè)人網(wǎng)站
總結(jié)
以上是生活随笔為你收集整理的IDEA热布署报错java.lang.IllegalStateException: Restarter has not been initialized的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 一次 .NET Core 中玩锁的经历:
- 下一篇: 安卓开发必备知识体系:安卓篇