zoukankan      html  css  js  c++  java
  • java.lang.IllegalStateException: Restarter has not been initialized

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

    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
    

    经了解是这个版本的依赖有问题

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

    参考

    个人网站

  • 相关阅读:
    Microjs: 超棒的迷你框架和迷你类库搜罗工具
    本周推荐7款CSS3实现的动态特效
    Bootstrap3.1开发的响应式个人简历模板
    10分钟,利用canvas画一个小的loading界面
    四款超棒的jQuery数字化签名插件
    搜索引擎优化网页设计:最佳实践
    推荐超实用的8款jQuery插件
    9款HTML5实现的超酷特效
    想成为程序猿?28个在线学习网站让你变身齐天大圣!
    推荐7款超棒的单页面网站设计模板。关键是!免费!!
  • 原文地址:https://www.cnblogs.com/panbingwen/p/10773896.html
Copyright © 2011-2022 走看看