nacos配置中心私有配置,我自己的代码没有错误,但一直读取不了
报错:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘scopedTarget.configController’: Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder ‘pwd’ in value “${pwd}”
解决方法:
我的问题是bootstrap.yml配置文件中,名称空间的id错误了,
我自己的名称空间id是 :d8ef556a-6d51-48b3-8661-325d37bd382d
配置文件的是:namespace: aebacab0-62be-485f-8e60-cc9cfc451087
修改为正确的名称空间id
没有自定义名称空间就注释掉此行