Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2021-04-19 10:28:28.155 ERROR 16888 --- [ main] o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.nacosConsumer': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'nacos.config' in value "${nacos.config}"
检查下dataId的.yaml或.yml要与项目中的配置文件的file-extension保持一致:要么都是yml,要么都是yaml
如果还解决不了问题,请检查dataId:
dataId默认组成:
${spring.application.name}-${spring.profiles.active}.${spring.cloud.config.file-extension}
如:上面图dataId为:springCloud-nacos-consumer-dev.yml