簡體   English   中英

PropertyPlaceholderConfigurer類中的locations屬性

[英]locations property in PropertyPlaceholderConfigurer class

每當我們要注入屬性文件列表時,都將以下代碼塊放入xml中:

<beans:bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
    <beans:property name="locations">
        <beans:list>
            <beans:value>abc.properties</beans:value>
            <beans:value>pqr.properties</beans:value>
        </beans:list>
    </beans:property>
</beans:bean>

但是,當我看到類PropertyPlaceholderConfigurer的源代碼時,看不到任何名為“ locations”的列表屬性。

為什么會這樣 ?

它實際上是如何工作的?

謝謝閱讀!

它是在PropertiesLoaderSupport中繼承的PropertyPlaceholderConfigurer

PropertyPlaceholderConfigurer

沃利在哪里?

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM