Spring中引入properties文件

方法1:
<context:property-placeholder location="classpath:com/dispatch/db.properties"/>


方法2:
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <property name="locations">
            <list>
                <value>classpath:com/dispatch/db.properties</value>
            </list>
        </property>
</bean>


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章