Published on Dec 22, 2022
Spring Batch 5.0 has been released by VMware. Based on Java 17 and Spring Framework 6.0, Spring Batch now supports GraalVM native image, a new Observation API, Java Records, and a long list of enhancements and fixes contributed by more than 50 contributors.
As part of Spring Batch 5, Spring Framework 6, Spring Integration 6, Spring Data 3, Spring AMQP 3, and Micrometer 1.10 are required. Further, all Jakarta EE APIs in this version are migrated from the JavaX namespaces to the Jakarta namespaces, as this version marks the beginning of the migration to Jakarta EE 9 as well. In addition to using Hibernate 6 for cursors and paging items, Spring Batch now uses Hibernate 6.
As an alternative to the @EnableBatchProcessing annotation, Spring Batch 5 introduces a new class, DefaultBatchConfiguration. All infrastructure beans are provided with default configuration, which can be customized by users. The JobExplorer interface now allows users to specify a transaction manager and customize its transaction attributes. In addition to providing enhancements to further leverage the Record API in the framework, the latest release also introduces support for the Record API, which was first introduced in Spring Batch 4. In addition, Spring Batch provides full support for SAP HANA and MariaDB.
@EnableBatchProcessing no longer exposes a transaction manager bean in the application context. This is a good development for user-defined transaction managers, as it avoids unconditional behavior as in previous versions. To avoid inconsistencies between XML and Java configuration styles, users must manually configure the transaction manager on any tasklet step definition. Additionally, the @EnableBatchProcessing annotation configures a JDBC-based JobRepository interface. To work with in-memory job repositories, VMware recommends using embedded databases.
Micrometer has been updated to version 1.10, which provides batch tracing and batch metrics. As of now, Spring Batch also creates a span for each job and step. In distributed tracing tools such as Zipkin, the data can be viewed.
A further refreshing change is the use of the JobParameter class to handle job parameters. In this way, users are no longer limited to long, double, string, or date types as they were in version 4. There is an impact on how parameters are stored in the database as a result of this change.
Additionally, Spring Batch 5 removes support for SQLFire, JSR-352 (Batch Applications for the Java Platform), and GemFire.
Presentations
Browse LSET presentations to understand interesting…
Explore Now
eBooks
Get complete guides to empower yourself academically…
Explore Now
Infographics
Learn about information technology and business…
Error: Contact form not found.
Error: Contact form not found.
Error: Contact form not found.
Error: Contact form not found.
Error: Contact form not found.
Error: Contact form not found.
Error: Contact form not found.
Error: Contact form not found.
Error: Contact form not found.
Error: Contact form not found.
Error: Contact form not found.
Error: Contact form not found.
Error: Contact form not found.
[wpforms id=”9030″]