Spring Batch - how to convert String from file to Date?

浪子不回头ぞ 提交于 2019-11-29 14:47:27

your forum reference is for type conversion while building the application context and configuring the beans

take a look at the JavaDoc for the BeanWrapperFieldSetMapper

To customize the way that FieldSet values are converted to the desired type for injecting into the prototype there are several choices. You can inject PropertyEditor instances directly through the customEditors *property*, or you can override the createBinder(Object) and initBinder(DataBinder) methods, or you can provide a custom FieldSet implementation.

meaning you should inject your CustomDateEditor directly into the Mapper

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!