spring properties
Edit[시대 착오적인 설정 파일 *.properties를 버리자](http://kwon37xi.egloos.com/4665590) 참조
스프링에서는 <context:property-placeholder/>, <util:properties/>, 국제화 메시지용 Resource Bundle에서 모두 'Properites XML’형식을 지원합니다. 3.1에서는 <context:property-placeholder/>와 @PropertySource를 썼을 때 'Properties XML' 형식이 인식이 안 되는 버그가 있었습니다. 3.1.2에서 이를 회피하는 방법은 <http://wiki.kwonnam.pe.kr/springframework/propertysource>를 참조하시기 바랍니다. 3.1.4, 3,2.1에서는 이 Bug가 fix되었습니다. 스프링의 이슈트랙커에 아래와 같이 등록되어 있습니다.
- [SPR-9896: ResourcePropertySource cannot load JDK 5 properties xml](https://jira.springsource.org/browse/SPR-9896)
- [Spring 3.0 (59) 프로퍼티 파일 이용하기 - placeholder vs SpEL](http://toby.epril.com/?p=968)- [Inside Spring (5) PropertyPlaceholderConfigurer를 @Bean으로 정의해서는 안되는 이유](http://toby.epril.com/?p=964)
- 스프링 3.1 (7) 프로퍼티 소스 추상화와 PropertySourcePlaceholderConfigurer](http://toby.epril.com/?p=1191)- [스프링 3.1 (4) Static @Bean 메소드](http://toby.epril.com/?p=1177)
- Spring Environment Profiles 활성화 전략
filesystem과 classpath에서 동시에찾는 설정
<context:property-placeholder location="file:config.properties, classpath:config.properties" ignore-resource-not-found="true"/>
Spel
@Value("#{server.hostName}")
<bean id="server" class="java.net.InetAddress" factory-method="getLocalHost"/>
<bean id="persistentMessageStore" class="org.springframework.integration.jdbc.JdbcMessageStore">
<property name="tablePrefix" value="channel_" />
<property name="region" value="#{server.name}" />
<constructor-arg ref="masterDataSource" />
</bean>
PropertyEditor
<bean id="dateEditor" class="org.springframework.beans.propertyeditors.CustomDateEditor">
<constructor-arg>
<bean class="java.text.SimpleDateFormat">
<constructor-arg value="yyyy-MM-dd HH:mm:ss" />
</bean>
</constructor-arg>
<constructor-arg value="true" />
</bean>
<bean class="org.springframework.beans.factory.config.CustomEditorConfigurer">
<property name="customEditors">
<map>
<entry key="java.util.Date">
<ref local="dateEditor" />
</entry>
</map>
</property>
</bean>