Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有批处理程序,它将使用 JdbcCursorItemReader 和 FlatFileItemWriter 从数据库中获取数据并放入平面文件中。但是现在我想在文件的开头附加一些简单的硬编码文本。请帮忙怎么办?
您可以简单地编写一个实现 FlatFileFooterCallback 接口的类,或者只使用默认实现 SummaryFooterCallback 类。
http://static.springsource.org/spring-batch/apidocs/org/springframework/batch/item/file/FlatFileFooterCallback.html