Register TypeConverter/PropertyEditor w/Spring Batch?
Hi all,
Probably a dumb question.
I have an ItemProcessor implementation that I'm using in a step, and one of its properties is of type java.util.Date. I know in Spring 3, registering custom type converters changed a bit, so I'm not sure how to register a TypeConverter<String,Date> so that when Spring Batch instantiates my ItemProcessor bean, it converts the SpEL expression in the config,
Code:
...
<constructor-arg value="#{jobParameters['date']}" />
...
into a proper java.util.Date using a particular format ("yyyyMMdd").
How should I do this? What's the Spring-supplied TypeConverter<String,Date> that takes a format string, if there is one?
RTFMs welcome, but I already looked at Spring 3's reference guide 5.5 "Spring 3 Type Conversion" and am not really sure where to set a ConversionService in Spring Batch or if & how I'm supposed to be using an org.springframework.beans.propertyeditors.CustomDa teEditor.
Thanks,
Matthew