开发者

PropertyPlaceholderConfigurer and depends-on

In the below code snippet

<bean id="placeholderProperties" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
    depends-on="e开发者_如何学Cnvironment">
    <property name="location" value="classpath:batch-${ENVIRONMENT}.properties" />

what is the significance of "depends-on" and how to manipulate the value of ${ENVIRONMENT} ??

is the Environment referring to my system variable in the environment variables of the system?


Check this

depends-on : The depends-on attribute can explicitly force one or more beans to be initialized before the bean using this element is initialized

In your case bean with id environment must get initialized before "placeholderProperties"

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜