개발환경/Spring
Spring custom PropertyEditors
idkbj
2009. 10. 8. 14:25
http://static.springsource.org/spring/docs/2.5.x/reference/validation.html#beans-beans-conversion-customeditor-registration
<bean id="customEditorConfigurer" class="org.springframework.beans.factory.config.CustomEditorConfigurer">
<property name="customEditors">
<map>
<entry key="java.util.Date">
<bean class="org.springframework.beans.propertyeditors.CustomDateEditor">
<constructor-arg index="0">
<bean class="java.text.SimpleDateFormat">
<constructor-arg>
<value>M/d/yy</value>
</constructor-arg>
</bean>
</constructor-arg>
<constructor-arg index="1">
<value>true</value>
</constructor-arg>
</bean>
</entry>
</map>
</property>
</bean>
<bean id="customEditorConfigurer" class="org.springframework.beans.factory.config.CustomEditorConfigurer">
<property name="customEditors">
<map>
<entry key="java.util.Date">
<bean class="org.springframework.beans.propertyeditors.CustomDateEditor">
<constructor-arg index="0">
<bean class="java.text.SimpleDateFormat">
<constructor-arg>
<value>M/d/yy</value>
</constructor-arg>
</bean>
</constructor-arg>
<constructor-arg index="1">
<value>true</value>
</constructor-arg>
</bean>
</entry>
</map>
</property>
</bean>