程序运行时出现了以下报错
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2020-06-08 14:34:40.870 ERROR 17532 --- [ restartedMain] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
Binding to target [Bindable@36dd790e type = org.springframework.boot.autoconfigure.web.ResourceProperties, value = 'provided', annotations = array<Annotation>[@org.springframework.boot.context.properties.ConfigurationProperties(prefix=spring.resources, value=spring.resources, ignoreInvalidFields=false, ignoreUnknownFields=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
主要看 Reason: The elements [spring.resources.cache-period] were left unbound. 是说开启热部署失败。
解决了。
导入了jackson依赖,还根据另一个经验贴的建议,修改了devtools依赖
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version> 2.11.0</version>
<type> bundle</type>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<version> 2.1.4.RELEASE</version>
</dependency>
转载自原文链接, 如需删除请联系管理员。
原文链接:Update your applications configuration更新应用程序的配置,转载请注明来源!