I have a weird issue with my FlatFileItemWriter callbacks. I have a custom ItemWriter implementing both FlatFileFooterCallback and FlatFileHeaderCallback. Consequently, I set he
When using Java config as you are, it's best to return the most specific type possible (the opposite of what you're normally told to do in java programming). In this case, your writer is returning ItemWriter
, but is step scoped. Because of this a proxy is created that can only see the type that your java config returns which in this case is ItemWriter
and does not expose the methods on the ItemStream
interface. If you return CityItemWriter
, I'd expect things to work.