You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spring-batch-docs/src/main/asciidoc/whatsnew.adoc
+33-1Lines changed: 33 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,10 @@ Spring Batch 5 is updating the dependencies across the board to the following ve
36
36
* Spring for Apache Kafka 3
37
37
* Micrometer 1.10
38
38
39
-
This release also marks the migration to Jakarta EE 9 APIs.
39
+
This release also marks the migration to:
40
+
41
+
* Jakarta EE 9
42
+
* Hibernate 6
40
43
41
44
[[batch-infrastructure-configuration-updates]]
42
45
=== Batch Infrastructure Configuration Updates
@@ -45,6 +48,7 @@ Spring Batch 5 includes the following infrastructure configuration updates:
45
48
46
49
* <<datasource-requirement-updates>>
47
50
* <<transaction-manager-bean-exposure>>
51
+
* <<default-transaction-manager-type>>
48
52
49
53
[[datasource-requirement-updates]]
50
54
==== DataSource Requirement Updates
@@ -65,14 +69,42 @@ context. While this was convenient in many cases, the unconditional exposure of
65
69
interfere with a user-defined transaction manager. In this release, `@EnableBatchProcessing` no longer exposes a
66
70
transaction manager bean in the application context.
67
71
72
+
[[default-transaction-manager-type]]
73
+
==== Default Transaction Manager Type
74
+
75
+
When no transaction manager is specified, `@EnableBatchProcessing` used (up to version 4.3) to register a default
76
+
transaction manager of type `org.springframework.jdbc.datasource.DataSourceTransactionManager` in the proxy around
77
+
`JobRepository` when a `DataSource` bean is defined in the application context. In this release, the type of the
78
+
default transaction manager has changed to `org.springframework.jdbc.support.JdbcTransactionManager`.
79
+
68
80
=== New features
69
81
82
+
==== Improved Java records support
83
+
84
+
The support for Java records as items in a chunk-oriented step has initially been introduced in v4.3,
85
+
but that support was limited due to the fact that v4 has Java 8 as a baseline. The initial support was
86
+
based on reflection tricks to create Java records and populate them with data, without having access to the
87
+
`java.lang.Record` API that was finalised in Java 16.
88
+
89
+
Now that v5 has Java 17 as a baseline, we have improved records support in Spring Batch by leveraging the
90
+
`Record` API in different parts of the framework. For example, the `FlatFileItemReaderBuilder` is now able
91
+
to detect if the item type is a record or a regular class and configure the corresponding `FieldSetMapper`
92
+
implementation accordingly (ie `RecordFieldSetMapper` for records and `BeanWrapperFieldSetMapper` for regular
93
+
classes). The goal here is to make the configuration of the required `FieldSetMapper` type _transparent_ to the user.
94
+
70
95
==== Batch tracing with Micrometer
71
96
72
97
With the upgrade to Micrometer 1.10, you can now get batch tracing in addition to batch metrics.
73
98
Spring Batch will create a span for each job and a span for each step within a job. This tracing
74
99
meta-data can be collected and viewed on a dahsboard like link:$$https://zipkin.io$$[Zipkin] for example.
75
100
101
+
==== Java 8 features updates
102
+
103
+
We took the opportunity of this major release to improve the code base with features from Java 8+, for example:
104
+
105
+
* Use default methods in interfaces and deprecate "support" classes (see link:$$https://github.com/spring-projects/spring-batch/issues/3924$$[issue 3924])
106
+
* Add `@FunctionalInterface` where appropriate in public APIs (see link:$$https://github.com/spring-projects/spring-batch/issues/4107$$[issue 4107])
107
+
76
108
==== Support for SAP HANA a job repository in Spring Batch
77
109
78
110
This release introduces the support of SAP HANA as an additional supported database for the job repository.
0 commit comments