Skip to content
Marten Deinum edited this page Jul 19, 2016 · 1 revision

Spring Utils - Batch

The batch module contains a few helper classes for Spring Batch.

LoggingItemWriter

The LoggingItemWriter is an ItemWriter implementation which does nothing more then log the passed in items to the configured org.slf4j.Logger instance. This can be useful when the need of debugging arises and the actual used ItemWriter doesn't have logging available.

Configuration is pretty easy just define the bean and wire it up in your chunk based processing.

<bean id="loggingItemWriter" class="biz.deinum.batch.item.LoggingItemWriter" />

or in Java based configuration

@Bean
public LoggingItemWriter loggingItemWriter() {
   return new LoggingItemWriter();
}
Clone this wiki locally