Could not resolve placeholder 'apiId' in value "${apiId}"

出现此错误其中一个原因是因为spring配置文件中同时出现了两个标签


<context:property-placeholder location="classpath*:redis.properties" />


    <context:property-placeholder location="classpath:config.properties"  />

解决办法是在后面加上ignore-unresolvable=”true”,两个都加或者其中一个加就可以.


    <context:property-placeholder location="classpath:config.properties" ignore-unresolvable="true" />

你可能感兴趣的:(Could not resolve placeholder 'apiId' in value "${apiId}")