Spring Batch 5.0.0-M8 is out!

Releases | Mahmoud Ben Hassine | October 13, 2022 | ...

On behalf of the team and all contributors, I am pleased to announce that Spring Batch 5.0.0-M8 is now available from our milestone repository.

In this milestone, we introduced two main changes:

  • New default execution context serialization format
  • SystemCommandTasklet enhancements

This blog post walks through these two major changes in details. For the complete list of changes, please check the release notes.

New default execution context serialization format

In this milestone release, the DefaultExecutionContextSerializer was updated to serialize/deserialize the context to/from Base64.

Moreover, the default ExecutionContextSerializer configured by @EnableBatchProcessing or DefaultBatchConfiguration was changed from JacksonExecutionContextStringSerializer to DefaultExecutionContextSerializer. The dependency to Jackson was made optional. In order to use the JacksonExecutionContextStringSerializer, jackson-core should be added to the classpath.

SystemCommandTasklet enhancements

The SystemCommandTasklet has been revisited in this release and was changed as follows:

  • A new strategy interface named CommandRunner was introduced in order to decouple the command execution from the tasklet execution. The default implementation is the JvmCommandRunner which uses the java.lang.Runtime#exec API to run system commands. This interface can be implemented to use any other API to run system commands.

  • The method that runs the command now accepts an array of Strings representing the command and its arguments. There is no need to tokenize the command or do any pre-processing anymore. This change makes the API more intuitive, and less prone to errors.


I would like to thank all contributors who had a role in this release! As we continue our work on Spring Batch 5, we look forward to your feedback on Github, Twitter and StackOverflow.

Spring Batch Home|Source on Github|Reference documentation

Get the Spring newsletter

Thank you!

Get ahead

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

Learn more

Get support

Spring Runtime 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