springboot热部署之后运行出现问题:
2019-10-29 11:33:23.472 ERROR 2924 — [ restartedMain] o.s.b.d.LoggingFailureAnalysisReporter :
APPLICATION FAILED TO START
Description:
Binding to target [Bindable@419f7b7a type = org.springframework.boot.autoconfigure.web.ResourceProperties, value = ‘provided’, annotations = array[@org.springframework.boot.context.properties.ConfigurationProperties(ignoreInvalidFields=false, ignoreUnknownFields=false, prefix=spring.resources, value=spring.resources)]] 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
解决办法:
- 依赖版本过低
org.springframework.boot
spring-boot-devtools
1.5.21.RELEASE
true
2.@SpringBootApplication注解后面加上(exclude = {DataSourceAutoConfiguration.class})即可 (我试了没有用)