前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >IDEA热布署报错java.lang.IllegalStateException

IDEA热布署报错java.lang.IllegalStateException

原创
作者头像
道可道非常道
修改2019-05-07 10:17:13
1.3K0
修改2019-05-07 10:17:13
举报
文章被收录于专栏:Java Web学习

在IDEA导入devtools依赖实现热布署,启动后遇到如下问题

代码语言:txt
复制
java.lang.IllegalStateException: Restarter has not been initialized
	at 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-period
    Value: 0
    Origin: "spring.resources.cache-period" from property source "refresh"
    Reason: The elements [spring.resources.cache-period] were left unbound.

Action:

Update your application's configuration


Process finished with exit code 1
经了解是这个版本的依赖有问题

直接去掉版本号或者改成下面这样即可

参考

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 在IDEA导入devtools依赖实现热布署,启动后遇到如下问题
    • 经了解是这个版本的依赖有问题
      • 直接去掉版本号或者改成下面这样即可
      领券
      问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档