Spring无法解析占位符

Spring无法解析占位符,第1张

Spring无法解析占位

您没有正确读取属性文件。propertySource应该将参数传递为:

file:appclient.properties
classpath:appclient.properties
。将注释更改为:

@PropertySource(value={"classpath:appclient.properties"})

但是我不知道您的

PropertiesConfig
文件包含什么,因为您也正在导入文件。理想情况下,
@PropertySource
应将注释保存在此处。



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

原文地址:https://54852.com/zaji/5131585.html

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

发表评论

登录后才能评论

评论列表(0条)

    保存