java.lang.IllegalArgumentException: Could not resolve placeholder

当在配置文件中写了两处:

<bean id="propertyConfigurer"
          class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <property name="location" value="classpath:jdbc.properties" />
    </bean>

就会找不到第一个配置文件中的属性…
引入多个,应该这么写:

  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <property name="locations">
            <list>
                <value>classpath:test.properties</value>
                <value>classpath:jdbc.properties</value>
            </list>
        </property>
    </bean>
posted @ 2019-08-01 10:38  你就像甜甜的益达  阅读(696)  评论(0编辑  收藏  举报