I am using Spring 3.0.3. I turned it on by ConversionServiceadding this line to my Spring XML configurator.
<mvc:annotation-driven/>
I also use custom ones PropertyEditorfor certain data types, so I registered them for the corresponding data types, such as the following, and they work fine.
webDataBinder.registerCustomEditor(Date.class, new MyPropertyEditor());
I have a special tag library that extends the Spring tag library, and I can use these PropertyEditorthrough getPropertyEditor()of AbstractDataBoundFormElementTag.
I do not understand that I cannot register custom PropertyEditorfor String for some reason. The following will not work.
webDataBinder.registerCustomEditor(String.class, new MyPropertyEditor());
When I do getPropertyEditor(), it always returns ConvertingPropertyEditorAdapterinstead MyPropertyEditor.
This is mistake?
. , . Spring .