出现此错误其中一个原因是因为spring配置文件中同时出现了两个标签
<!--加载配置信息A -->
<context:property-placeholder location="classpath*:redis.properties" />
<!--加载配置信息B -->
<context:property-placeholder location="classpath:config.properties" />
解决办法是在后面加上ignore-unresolvable=”true”,两个都加或者其中一个加就可以.
<!--加载配置信息 -->
<context:property-placeholder location="classpath:config.properties" ignore-unresolvable="true" />