Spring Batch 4.1.0.M2 Released

Releases | Mahmoud Ben Hassine | July 13, 2018 | ...

We are pleased to announce that Spring Batch 4.1.0.M2 is now available on Github and the Pivotal download repository. Many thanks to all of those who contributed to this release!

What’s new?

Here are the highlights of this release:

  • Simplify remote partitioning
  • Add a new JSON item writer
  • Add support for validating items with the Bean Validation API

Simplify remote partitioning

In the 4.1.0.M1 release, we created new APIs to simplify the configuration of a remote chunking step. In this milestone, we continued this effort to simplify remote partitioning through two new builders: RemotePartitioningMasterStepBuilder and RemotePartitioningWorkerStepBuilder.

These builders can be autowired in your configuration class if the @EnableBatchIntegration is present as shown in the following example:

public class RemotePartitioningAppConfig {

   private RemotePartitioningMasterStepBuilderFactory masterStepBuilderFactory;

   private RemotePartitioningWorkerStepBuilderFactory workerStepBuilderFactory;

   public Step masterStep() {
            return this.masterStepBuilderFactory
               .partitioner("workerStep", partitioner())

   public Step workerStep() {
            return this.workerStepBuilderFactory

   // Middleware beans setup omitted

These new builders take care of the heavy lifting of configuring infrastructure beans. You can now easily configure a master step and a worker step of a remotely partitioned job.

Add a new JSON item writer

In the previous milestone, we created a new item reader to support reading JSON data. In this milestone, we added the JsonFileItemWriter and supporting builder to support writing JSON data.

Bean Validation API support

This release comes with a new ValidatingItemProcessor called BeanValidatingItemProcessor that is able to validate items annotated with the Bean Validation API annotations. This new component will adapt the infrastructure provided by Spring Framework or Spring Boot for Bean Validation API support to an ItemProcessor useful within the step of a Spring Batch job..

For a complete list of changes, please check the change log. We look forward to hearing your feedback on this milestone! Please feel free to ping @michaelminella, @_benas_, or @cppwfs on Twitter or ask your question on StackOverflow or Gitter. If you find any issue, please open a ticket on Jira.

Spring Batch Home | Source on GitHub | Reference Documentation

Get the Spring newsletter

Stay connected with the Spring newsletter


Get ahead

VMware offers training and certification to turbo-charge your progress.

Learn more

Get support

Tanzu Spring offers support and binaries for OpenJDK™, Spring, and Apache Tomcat® in one simple subscription.

Learn more

Upcoming events

Check out all the upcoming events in the Spring community.

View all