v4.3.0
⭐ New features
- Add support to use Java 14 records as items #3693
- Add
JpaCursorItemReaderimplementation #901 - Add setter for
standaloneattribute inStaxEventItemWriter#758 - Add ability to start reading from a custom offset in
KafkaItemReader#737 - Add encoding parameter in
StaxEventItemReader#807 - Add job name tag to
spring.batch.job.activemetric #3750 - Add
getUniqueJobParametersBuilder()method inJobLauncherTestUtils#767 - Add
JobParametersIncrementerimplementation based on aDataFieldMaxValueIncrementer#1521 - Add
SynchronizedItemStreamWriter#842 - Add
beanRowMappermethod toJdbcPagingItemReaderBuilder#819 - Add support for named queries in
JpaPagingItemReader#1667 - Add support for annotation based
JobExecutionListenerin theJobBuilder#817 - Meta-annotate
@SpringBatchTestwith@ExtendWith(SpringExtension.class)#3647 - Set
proxyBeanMethodsto false onModularBatchConfigurationandSimpleBatchConfiguration#3715
🚀 Enhancements
- Add connection parameter to
AbstractCursorItemReader#cleanupOnClose#735 BulkOperationsAPI Implementation for Remove Operations inMongoItemWriter#3737StaxEventItemReader#isFragmentRootElementNamemethod should be protected #1020- Let
FlatFileItemReadercomment detection logic be customizable #1134 - Performance issues in
SimpleJobRepository.getStepExecutionCount#3657 - Slow SQL in
JdbcStepExecutionDaoon Postgres #3634 - Improve
TransactionAwareBufferedWriterefficiency #1166 - Improve performance in
JdbcStepExecutionDao#3710 - Make
RepositoryItemWriteruseCrudRepository#saveAllby default #3720 - Use
BulkOperationsAPI inMongoItemWriter#3713 - Add ability to amend trusted classes in
Jackson2ExecutionContextStringSerializer#3765 - Improve formatting of
IllegalArgumentExceptionmessage thrown byDefaultExecutionContextSerializer#3636
🐞 Bug fixes
- Unable to set
partitionOffsetsinKafkaItemReaderBuilder#3761 SimpleCompletionPolicyshould havegetChunkSize()method #3738- Unable to set
usePersistparameter withJpaItemWriterBuilder#3655 MongoItemReaderBuildershouldn't be throwing an error related to the limit in query when pageSize is provided #3673- MySQL does not support millisecond accuracy in timestamps #2202
JobLauncherTestUtilsdoesn't always launch new job instance because generated job parameters aren't unique #821- Unable to set
connectionAutoCommitparameter withJdbcCursorItemReaderBuilder#3717 - Incorrect Jackson configuration #3729
- Setting resource should be optional for
JsonItemReaderBuilder#3731 - Resource should be optional in
StaxEventItemReaderBuilder#3736 StaxEventItemReaderBuilderfailing to set name for Reader at build #3753- Conditional (Java configured) steps cannot be scoped #857
- Order of Transition Elements Does Not Adhere to Documentation #3638
AbstractSqlPagingQueryProviderDoes Not Handle Whitespace Besides the Space Character When Removing Keywords #765setScriptEvaluatormethod inScriptItemProcessorremoved in Spring Batch 4 #768- Incorrect error message when no
FieldSetMapperis provided #766 AbstractCursorItemReader#doClose()method is not reentrant #868- The constructor of
JsonItemReadershould callsetExecutionContextName()#3681 FaultTolerantChunkProcessordoes not collect metrics likeSimpleChunkProcessor#3664FlatFileItemReaderBuilderreports error "Only one LineTokenizer option may be configured" when none are. #3688- Default value of comment prefix in
FlatFileItemReaderBuilderis inconsistent withFlatFileItemReader#753 - Empty String as delimiter is ignored #770
- Regression due to the fix of BATCH-2442 #775
FlatFileItemReaderBuilderdoes not overrule comment prefixes in returnedFlatFileItemReader#779FlatFileItemWriterBuilderrequires aResource#887- List should be final in
CompositeItemStream#1628 - Job scoped steps can not be used within
FlowBuilder#670
📔 Documentation
- Fix typo in spring-batch-intro.adoc #3755
- Add flag to show both configuration styles (Java and XML) in reference docs #572
- Fix documentation of
JobExecutionNotRunningException#3679 - Updated
spring-doc-resourcesversion to 0.2.2 - Incorrect reference to stop method in documentation #3643
- Improve Javadoc of
ItemProcessorregarding the nullability of input items #3648 - Misleading code example in reference documentation #3692
- The
ItemProcessorsection in reference docs should be a top level section #3644 - Use local storage rather than a cookie #3653
- Add flag to show both configuration styles (Java and XML) in reference docs #572
- Upgrade versions of Asciidoctor #3703
- Add micrometer metrics tags in reference documentation #3751
- Add section in docs about how to disable batch metrics #3684
- Document non-identifying job parameters #3633
- Multiple Job unit testing with
@SpringBatchTest#3699 - Unable to use Job Scope beans in a multi-threaded or partitioned step #1335
- Incorrect table name in Meta-Data Schema appendix #761
- Incorrect description of
AggregateItemReaderin "Appendix A" #1793 - It's unclear and confusing that using
<skippable-exception-class>element #1061 - Wording Fix: domain.adoc #814
- Documentation: XSD specifies incorrect type for RetryPolicy #769
- Fix dead link to Github in contribution guide #3642
🔨 Dependency Upgrades
- Upgrade to Spring Framework 5.3.0
- Upgrade to Spring Data 2020.0.0
- Upgrade to Spring Integration 5.4.0
- Upgrade to Spring AMQP 2.3.0
- Upgrade to Spring for Apache Kafka 2.6.2
- Upgrade to micrometer 1.5.6
⚠️ Deprecations
- Deprecate
JobExecution#stop()#1605 - Deprecate
MultiResourceItemReader#getCurrentResource#3776 - Deprecate
AbstractNeo4jItemReader#3777 - Deprecate
org.springframework.batch.item.file.transform.Alignmentenum #3778 - Deprecate
org.springframework.batch.item.xml.StaxUtils#3779 - Deprecate the Map-based
JobRepository/JobExplorerimplementations #3780 - Deprecate
ScheduledJobParametersFactory#3781 - Deprecate support for SqlFire database #815
❤️ Contributors
We'd like to thank all contributors who helped making this release possible! A special thank to @dimitrisli and @parikshitdutta
for their numerous contributions to this release!