소프트웨어/spring
Spring 외부 properties 설정
야솔아빠
2012. 7. 3. 14:53
반응형
Spring 외부 properties 사용
<!-- 절대경로 -->
<bean id="propertyConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>
file:${properties.home}/config${type}.xml
</value>
</list>
</property>
</bean>
<!-- classpath -->
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>classpath:/properties/globals.properties</value>
<value>classpath:/profile/**/*.properties</value>
</list>
</property>
</bean>
반응형