注册Nacos时出现 Could not resolve placeholder ‘demo.name‘ in value “${demo.name}“ 的解决方法

目录

  • 1. 问题所示
  • 2. 原理分析
  • 3. 解决方法

1. 问题所示

读取Nacos的时候

出现如下问题(由于过长,部分省略):

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.demoController': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'demo.name' in value "${demo.name}"
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:405) ~[spring-beans-5.3.27.jar:5.3.27]
	.....
	......
	......
	at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:164) [spring-boot-2.7.10.jar:2.7.10]
	at org.springblade.core.launch.BladeApplication.run(BladeAp

你可能感兴趣的:(BUG,Nacos,java,微服务)