错误提示:
Application failed to start due to an exception
org.springframework.cloud.config.client.ConfigServerConfigDataMissingEnvironmentPostProcessor$ImportException: No spring.config.import set
建议的解决方案:
***************************
APPLICATION FAILED TO START
***************************
Description:
No spring.config.import property has been defined
Action:
Add a spring.config.import=configserver: property to your configuration.
If configuration is not required add spring.config.import=optional:configserver: instead.
To disable this check, set spring.cloud.config.enabled=false or
spring.cloud.config.import-check.enabled=false.
解决方案
springcloud2020 版本 把Bootstrap被默认禁用,
spring.config.import加入了对解密的支持。对于Config Client、Consul、Vault和Zookeeper的配置导入,
如果你需要使用原来的配置引导功能,
那么需要将org.springframework.cloud:spring-cloud-starter-bootstrap依赖引入到工程中