Using CustomEditorConfigurer for DataBinding
Hi!
I want to use a custom editor for data binding.
So far i know that i have to create a CustomEditorConfigurer in the application context like this:
Code:
<bean id="customEditorConfigurer" class="org.springframework.beans.factory.config.CustomEditorConfigurer">
<property name="customEditors">
<map>
<entry />...
</map>
</property>
</bean>
To apply a custom editor to the DataBinder of a controller you need to overwrite the initBinder method of the BaseCommandController like this:
Code:
binder.registerCustomEditor(Any.class, customEditor);
But i would like to configure custom editors via the application context.
I could not find a solution so far.
I thought it was Spring's idea to configure as much as possible in the app-context.
Any ideas?
Thanks in advance.