As of Spring 2.0, the recommended usage is to use custom
PropertyEditorRegistrar implementations that in turn register
any desired editors on a given
registry .
Each PropertyEditorRegistrar can register any number of custom editors.
Also supports "java.lang.String[]"-style array class names and primitive
class names (e.g. "boolean"). Delegates to ClassUtils for actual
class name resolution.
NOTE: Custom property editors registered with this configurer do
not apply to data binding. Custom editors for data binding need to
be registered on the DataBinder :
Use a common base class or delegate to common PropertyEditorRegistrar
implementations to reuse editor registration there.
As of Spring 2.0, the recommended usage is to use custom PropertyEditorRegistrar implementations that in turn register any desired editors on a given registry . Each PropertyEditorRegistrar can register any number of custom editors.
<bean id="customEditorConfigurer" class="org.springframework.beans.factory.config.CustomEditorConfigurer"> <property name="propertyEditorRegistrars"> <list> <bean class="mypackage.MyCustomDateEditorRegistrar"/> <bean class="mypackage.MyObjectEditorRegistrar"/> </list> </property> </bean>Alternative configuration example with custom editor classes:
<bean id="customEditorConfigurer" class="org.springframework.beans.factory.config.CustomEditorConfigurer"> <property name="customEditors"> <map> <entry key="java.util.Date" value="mypackage.MyCustomDateEditor"/> <entry key="mypackage.MyObject" value="mypackage.MyObjectEditor"/> </map> </property> </bean>Also supports "java.lang.String[]"-style array class names and primitive class names (e.g. "boolean"). Delegates to ClassUtils for actual class name resolution.
NOTE: Custom property editors registered with this configurer do not apply to data binding. Custom editors for data binding need to be registered on the DataBinder : Use a common base class or delegate to common PropertyEditorRegistrar implementations to reuse editor registration there.