spring的application.xml中配置从properties读取文件

有两种方法:
<context:property-placeholder location="classpath:jdbc.properties"/>spring

------------------------孤独的分割线---------------------------------------spa

<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <property name="locations">
            <list>
                <value>classpath:jdbc.properties</value>io

                <value>classpath:jdbc2.properties</value>
            </list>
        </property>
</bean>class

---------------------结束-------------------------此致敬礼---------------------jdbc

相关文章
相关标签/搜索