SpringCloud整合Nacos启动报错:Injection of autowired dependencies failed; nested exception is java.lang.Ill

SpringCloud整合Nacos启动报错:Injection of autowired dependencies failed; nested exception is java.lang.Ill,第1张

报错内容:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘memberServiceImpl’: Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder ‘demo.userName’ in value “${demo.userName}”

问题原因:
默认情况下Nacos读取配置文件为properties结尾

解决方式:
bootstrap.yml配置文件中指定配置文件格式为yml

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/langs/734010.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-04-27
下一篇 2022-04-27

发表评论

登录后才能评论

评论列表(0条)

保存