application.properties保存报错

application.properties报错

Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘constantPropertiesUtil’: Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder ‘aliyun.vod.file.keyid’ in value “${aliyun.vod.file.keyid}”

application.properties保存报错application.properties保存报错

遇到这个问题那就是神学了
方法1.修改文件名为yml 然后在自己手敲一次
方法2.重新敲一次配置文件
方法3.在别人电脑敲完,然后替换掉自己的配置文件

为什么说是神学呢,因为我自己遇到后手敲一遍,然后成功运行了,然后撤回之前的代码也可以运,这就是奇怪的地方,假如你们遇到了也可以留言告诉我一下你们的解决方案