Skip to content

Commit fbaa054

Browse files
committed
Update what's new section for 5.1.0-M3
1 parent 6eeaf4d commit fbaa054

File tree

1 file changed

+61
-6
lines changed

1 file changed

+61
-6
lines changed

spring-batch-docs/modules/ROOT/pages/whatsnew.adoc

+61-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[[whatsNew]]
22
= What's New in Spring Batch 5.1
33

4-
This section shows the major highlights of Spring Batch 5.1.
4+
This section shows the major highlights of Spring Batch 5.1. For the complete list of changes, please refer to the https://github.com/spring-projects/spring-batch/releases[release notes].
55

66
Spring Batch 5.1 introduces the following features:
77

@@ -11,17 +11,24 @@ Spring Batch 5.1 introduces the following features:
1111
* xref:whatsnew.adoc#new-synchronized-decorators[New synchronized decorators for item readers and writers]
1212
* xref:whatsnew.adoc#new-cursor-based-mongo-item-reader[New Cursor-based MongoItemReader]
1313
* xref:whatsnew.adoc#bulk-inserts-support-mongo-item-writer[Bulk inserts support in MongoItemWriter]
14+
* xref:whatsnew.adoc#new-item-reader-and-writer-for-redis[New item reader and writer for Redis]
15+
* xref:whatsnew.adoc#automatic-configuration-of-jobregistrybeanpostprocessor[Automatic configuration of JobRegistryBeanPostProcessor]
16+
* xref:whatsnew.adoc#ability-to-start-a-job-flow-with-a-decision[Ability to start a job flow with a decision]
17+
* xref:whatsnew.adoc#ability-to-provide-a-custom-jobkeygenerator[Ability to provide a custom JobKeyGenerator]
18+
* xref:whatsnew.adoc#new-documentation-based-on-antora[New documentation based on Antora]
1419

1520
[[dependencies-upgrade]]
1621
== Dependencies upgrade
1722

1823
In this release, the Spring dependencies are upgraded to the following versions:
1924

20-
* Spring Framework 6.1.0-M4
21-
* Spring Integration 6.2.0-M2
22-
* Spring Data 3.2.0-M2
23-
* Spring LDAP 3.2.0-M2
24-
* Micrometer 1.12.0-M2
25+
* Spring Framework 6.1.0-M5
26+
* Spring Integration 6.2.0-M3
27+
* Spring Data 3.2.0-M3
28+
* Spring LDAP 3.2.0-M3
29+
* Spring AMQP 3.1.0-M1
30+
* Spring Kafka 3.1.0-M1
31+
* Micrometer 1.12.0-M3
2532

2633
[[virtual-threads-support]]
2734
== Virtual Threads support
@@ -81,3 +88,51 @@ in the target collection.
8188
Similar to the `persist` and `merge` operations in the `JpaItemWriter`, this release adds a new operation named
8289
`insert` in the `MongoItemWriter`, which is designed for bulk inserts. This new option performs better than
8390
`upsert` for new items as it does not require an additional lookup to check if items already exist in the target collection.
91+
92+
[[new-item-reader-and-writer-for-redis]]
93+
=== New item reader and writer for Redis
94+
95+
A new `RedisItemReader` is now available in the library of built-in item readers. This reader is based on Spring Data Redis
96+
and can be configured with a `ScanOptions` to scan the key set to read from Redis.
97+
98+
Similarly, a new `RedisItemWriter` based on Spring Data Redis is now part of the writers library. This writer can be configured
99+
with a `RedisTemplate` to write items to Redis.
100+
101+
[[automatic-configuration-of-jobregistrybeanpostprocessor]]
102+
=== Automatic configuration of JobRegistryBeanPostProcessor
103+
104+
When configuring a `JobOperator` in a Spring Batch application, it is necessary to register the jobs in the operator's `JobRegistry`.
105+
This registration process is either done manually or automatically by adding a `JobRegistryBeanPostProcessor` bean to the application
106+
context.
107+
108+
In this release, the default configuration of Spring Batch (ie by using `@EnableBatchProcessing` or extending `DefaultBatchConfiguration`)
109+
now automatically registers a `JobRegistryBeanPostProcessor` bean to the application context. This simplifies the configuration process
110+
and improves the user experience when using a `JobOperator`.
111+
112+
[[ability-to-start-a-job-flow-with-a-decision]]
113+
=== Ability to start a job flow with a decision
114+
115+
When using the XML configuration style, it is possible to start a job flow with a decider thanks to the `<decision>` element.
116+
However, up to version 5.0, it was not possible to achieve the same flow definition with the Java API.
117+
118+
In this release, a new option to start a job flow with a `JobExecutionDecider` was added to the `JobBuilder` API.
119+
This makes both configuration styles more consistent.
120+
121+
[[ability-to-provide-a-custom-jobkeygenerator]]
122+
=== Ability to provide a custom JobKeyGenerator
123+
124+
By default, Spring Batch identifies job instances by calculating an MD5 hash of the identifying job parameters. While it is unlikely to
125+
need to customize this identification process, Spring Batch still provide a strategy interface for users to override the default mechanism
126+
through the `JobKeyGenerator` API.
127+
128+
Up to version 5.0, it was not possible to provide a custom key generator without having to create a custom `JobRepository` and `JobExplorer`.
129+
In this version, it is now possible to provide a custom `JobKeyGenerator` through the factory beans of `JobRepository` and `JobExplorer`.
130+
131+
[[new-documentation-based-on-antora]]
132+
=== New documentation based on Antora
133+
134+
The reference documentation was updated to use https://antora.org[Antora]. This update introduces a number of improvements, including but not limited to:
135+
136+
* Multi-version documentation: it is now possible to navigate from one version to another thanks to the drop down version list in the left side menu.
137+
* Integrated search experience: powered by https://docsearch.algolia.com/[Algolia], the search experience in now better thanks to the integrated search box at the top left of the page
138+
* Improved configuration style toggle: the toggle to switch between the XML and Java configuration styles for code snippets is now located near each sample, rather than the top of each page

0 commit comments

Comments
 (0)