Releases: spring-projects/spring-batch
Releases · spring-projects/spring-batch
v5.0.0-M1
This is the first milestone of Spring Batch 5.0. This milestone contains a number of breaking changes. Please refer to the migration guide for more details about upgrade instructions.
🚀 Enhancements
- Remove the unconditional exposure of the transaction manager as a bean #3981
- SQL Server Auto-generated Schema - TEXT data type deprecated: #864
- Deprecate support classes implementing interfaces with default methods #3925
- Add default methods in interfaces #3924
- JobParameter must not accept null values #3913
- FlatFileItemWriter now uses charset to determine default encoding #3910
- FlatFileItemReader and FlatFileItemWriter don't have the same default encoding #1154
- Avoid string conversion in ExecutionContextSerializer tests #3986
- Make ScopeConfiguration publicly accessible #3958
- In JOB_PARAMS table DATE_VAL column is updated incorrectly Like "1/1/1970 1:00:00.000000 AM" instead to the current date #1577
- Use default methods in TestExecutionListener #3909
- refactor: simplify boolean expression #3945
- Remove Reflection from StepScopeTestExecutionListener #3908
- Replace deprecated TransactionSynchronizationAdapter #3874
- Remove double brace initialization #3868
- Fix some raw types #3803
- Don't call wrapper constructors directly #3800
- Replace Assert.assertThat with MatcherAssert.assertThat #3804
- Replace #initMocks with MockitoRule #3805
- Refactor deprecated extractDatabaseMetaData #3873
- Simplify GET_LAST_STEP_EXECUTION #3997
- Make countStepExecutions access batch_job_execution only once #3876
- Adjust h2 schema to work with v2.0.x #4043
- Adjust H2PagingQueryProvider to work with v2.x #4047
- Require spring-jdbc in core module #4048
- Rename setJobIncrementer to setJobInstanceIncrementer in JdbcJobInstanceDao #3929
⭐ Features
- Upgrade minimum Java version to 17 #3994
- Add setter with a strongly typed parameter for the transaction isolation level type #4032
- Add getDataSource method to DefaultBatchConfigurer #3872
🐞 Bug fixes
- StepExecution counts integer overflow #3650
- Deadlock accessing creating a job on sqlserver when multiple jobs start at once #1448
- Oracle Error on creating new Batch Job #1127
- Oracle clustered environment with cached sequences can lead to Spring Batch thinking new job already exists #2000
- Batch sequences generate unordered ids, which results in unordered instances returned by JobExplorer #1422
- DefaultBatchConfigurer warns about the lack of TransactionManager provided, yet offers no way to supply it #763
- No pom.xml for published artifacts for 5.0.0-SNAPSHOT #4028
- Map.of() cannot be deserialized #4036
🔨 Tasks
- Favour jakarta over javax components #3656
- Upgrade Spring dependencies to major versions #4027
- Deprecate support for Neo4j #3956
- Update maven wrapper version to 3.8.2 #3978
- Clean up schema versions in XML files #913
- Remove deprecated APIs #3836
- Remove usage of deprecated APIs #3838
- Remove SQLFire support #3839
- Remove JSR-352 implementation #3894
- Updated graceful shutdown sample by removing deprecated code #3916
- Replaces deprecated interfaces #3971
- Remove some deprecated APIs from tests #3962
- CI builds against various database platforms #3092
- OptimisticLockingFailureTests.testAsyncStopOfStartingJob fails intermittently #1121
- Intermittent failure in ConcurrentTransactionTests on windows #3851
- Intermittent failure in AsynchronousTests on windows #3852
- FaultTolerantExceptionClassesTests testNoRollbackTaskletRollbackException fails intermittently #1117
- Rename master branch to main #3879
- Update build process to use Maven #3820
🔨 Dependency Upgrades
- Upgrade to Spring Framework 6.0.0-M2
- Upgrade to Spring Data 2022.0.0-M1
- Upgrade to Spring Integration 6.0.0-M1
- Upgrade to Spring AMQP 3.0.0-M1
- Upgrade to Spring for Apache Kafka 3.0.0-M1
- Upgrade to Micrometer 2.0.0-M1
📔 Documentation
- Editing of the job edit changes #3918
- Add EPUB output in documentation #3920
- Restore the dynamic ToC #4019
❤️ Contributors
We'd like to thank all contributors who helped in making this release possible!
v4.3.4
🐞 Bug fixes
- Consider making JobParameters#getParameters() immutable #3980
- JdbcPagingItemReader with sort key crashes in multithreaded step for empty query #3898
- BatchTestContextCustomizer does not implement hashCode/equals, preventing context caching #3940
- "IllegalArgumentException: Only 1 out of 2 arguments could be assigned" using MethodInvokingTaskletAdapter + NamedParameterJdbcTemplate #3794
- Remove whitespace to support multiple execution statement #3861
- SimpleJobExplorer#getLastJobExecution does not fetch step executions #3943
- NPE in JDBC ItemReaders after changes in spring-jdbc's AbstractFallbackSQLExceptionTranslator #3968
📔 Documentation
v4.2.8.RELEASE
🐞 Bug fixes
- Consider making JobParameters#getParameters() immutable #3980
- JdbcPagingItemReader with sort key crashes in multithreaded step for empty query #3898
- BatchTestContextCustomizer does not implement hashCode/equals, preventing context caching #3940
- "IllegalArgumentException: Only 1 out of 2 arguments could be assigned" using MethodInvokingTaskletAdapter + NamedParameterJdbcTemplate #3794
- Remove whitespace to support multiple execution statement #3861
- SimpleJobExplorer#getLastJobExecution does not fetch step executions #3943
- NPE in JDBC ItemReaders after changes in spring-jdbc's AbstractFallbackSQLExceptionTranslator #3968
📔 Documentation
v4.3.3
🐞 Bug fixes
- SimpleJobRepository should ignore non-identifying JobParameters #1221
- Setting item processor property with lambda error #3749
- Override SimpleStepBuilder.faultTolerant() in FaultTolerantStepBuilder #3840
- JdbcCursorItemReaderBuilder defaults verifyCursorPosition to false, but its Javadoc says the opposite #3893
- org.springframework.batch.core.JobParameter.toString may return null #834
- AvroItemWriter uses GenericDatumWriter instead of SpecificDatumWriter for type that extends SpecificRecordBase #3859
🚀 Enhancements
- Replace the list used internally by the ListItemReader (ArrayList -> LinkedList) #3782
📔 Documentation
v4.2.7.RELEASE
🐞 Bug fixes
- SimpleJobRepository should ignore non-identifying JobParameters #1221
- Setting item processor property with lambda error #3749
- Override SimpleStepBuilder.faultTolerant() in FaultTolerantStepBuilder #3840
- JdbcCursorItemReaderBuilder defaults verifyCursorPosition to false, but its Javadoc says the opposite #3893
- org.springframework.batch.core.JobParameter.toString may return null #834
- AvroItemWriter uses GenericDatumWriter instead of SpecificDatumWriter for type that extends SpecificRecordBase #3859
🚀 Enhancements
- Replace the list used internally by the ListItemReader (ArrayList -> LinkedList) #3782
📔 Documentation
v4.3.2
🐞 Bug fixes
- Incorrect value of kind attribute in spring-batch-3.0.xsd #1479
- KafkaItemWriter should wait for results of kafkaTemplate.sendDefault call #3773
- Incorrect usage of StringBuilder in TransactionAwareBufferedWriter #3745
🚀 Enhancements
- Provide constructors for injection #3819
- Jackson2ExecutionContextStringSerializer should trust result of Arrays.asList() by default #3830
- Add java.sql.Timestamp to trusted classes in Jackson2ExecutionContextStringSerializer #3855
- Added isXXXEnabled for logging statements #3814
- Better sizes for StringBuilder #3813
- Reduce the toCharArray overhead #3812
📔 Documentation
v4.2.6.RELEASE
🐞 Bug fixes
- Incorrect value of kind attribute in spring-batch-3.0.xsd #1479
- KafkaItemWriter should wait for results of kafkaTemplate.sendDefault call #3773
- Incorrect usage of StringBuilder in TransactionAwareBufferedWriter #3745
🚀 Enhancements
- Provide constructors for injection #3819
- Jackson2ExecutionContextStringSerializer should trust result of Arrays.asList() by default #3830
- Add java.sql.Timestamp to trusted classes in Jackson2ExecutionContextStringSerializer #3855
- Added isXXXEnabled for logging statements #3814
- Better sizes for StringBuilder #3813
- Reduce the toCharArray overhead #3812
📔 Documentation
v4.3.1
🐞 Bug fixes
- After restarting a failed job using
RunIdIncrementer
, all subsequent job launches throwClassCastException
#3799 - Use
isQuoteCharacter
instead of direct char comparison inDelimitedLineTokenizer
#682 - Incorrect behaviour of
RepositoryItemReader#jumpToItem()
on restart #1074 - Do not throw NPE for job instances without executions #3798
🚀 Enhancements
kafkaTemplate
inKafkaItemWriter
should beprotected
#3802
v4.2.5.RELEASE
🐞 Bug fixes
- Setting resource should be optional for
JsonItemReaderBuilder
#3731 - Resource should be optional in
StaxEventItemReaderBuilder
#3736 StaxEventItemReaderBuilder
failing to set name for Reader at build #3753- Job scoped steps can not be used within
FlowBuilder
#670 - After restarting a failed job using
RunIdIncrementer
, all subsequent job launches throwClassCastException
#3799 - Use
isQuoteCharacter
instead of direct char comparison inDelimitedLineTokenizer
#682 - Incorrect behaviour of
RepositoryItemReader#jumpToItem()
on restart #1074 - Do not throw NPE for job instances without executions #3798
🚀 Enhancements
kafkaTemplate
inKafkaItemWriter
should beprotected
#3802
📔 Documentation
- Fix typo in
spring-batch-intro.adoc
#3755
v4.3.0
⭐ New features
- Add support to use Java 14 records as items #3693
- Add
JpaCursorItemReader
implementation #901 - Add setter for
standalone
attribute 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.active
metric #3750 - Add
getUniqueJobParametersBuilder()
method inJobLauncherTestUtils
#767 - Add
JobParametersIncrementer
implementation based on aDataFieldMaxValueIncrementer
#1521 - Add
SynchronizedItemStreamWriter
#842 - Add
beanRowMapper
method toJdbcPagingItemReaderBuilder
#819 - Add support for named queries in
JpaPagingItemReader
#1667 - Add support for annotation based
JobExecutionListener
in theJobBuilder
#817 - Meta-annotate
@SpringBatchTest
with@ExtendWith(SpringExtension.class)
#3647 - Set
proxyBeanMethods
to false onModularBatchConfiguration
andSimpleBatchConfiguration
#3715
🚀 Enhancements
- Add connection parameter to
AbstractCursorItemReader#cleanupOnClose
#735 BulkOperations
API Implementation for Remove Operations inMongoItemWriter
#3737StaxEventItemReader#isFragmentRootElementName
method should be protected #1020- Let
FlatFileItemReader
comment detection logic be customizable #1134 - Performance issues in
SimpleJobRepository.getStepExecutionCount
#3657 - Slow SQL in
JdbcStepExecutionDao
on Postgres #3634 - Improve
TransactionAwareBufferedWriter
efficiency #1166 - Improve performance in
JdbcStepExecutionDao
#3710 - Make
RepositoryItemWriter
useCrudRepository#saveAll
by default #3720 - Use
BulkOperations
API inMongoItemWriter
#3713 - Add ability to amend trusted classes in
Jackson2ExecutionContextStringSerializer
#3765 - Improve formatting of
IllegalArgumentException
message thrown byDefaultExecutionContextSerializer
#3636
🐞 Bug fixes
- Unable to set
partitionOffsets
inKafkaItemReaderBuilder
#3761 SimpleCompletionPolicy
should havegetChunkSize()
method #3738- Unable to set
usePersist
parameter withJpaItemWriterBuilder
#3655 MongoItemReaderBuilder
shouldn'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
JobLauncherTestUtils
doesn't always launch new job instance because generated job parameters aren't unique #821- Unable to set
connectionAutoCommit
parameter withJdbcCursorItemReaderBuilder
#3717 - Incorrect Jackson configuration #3729
- Setting resource should be optional for
JsonItemReaderBuilder
#3731 - Resource should be optional in
StaxEventItemReaderBuilder
#3736 StaxEventItemReaderBuilder
failing 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
AbstractSqlPagingQueryProvider
Does Not Handle Whitespace Besides the Space Character When Removing Keywords #765setScriptEvaluator
method inScriptItemProcessor
removed in Spring Batch 4 #768- Incorrect error message when no
FieldSetMapper
is provided #766 AbstractCursorItemReader#doClose()
method is not reentrant #868- The constructor of
JsonItemReader
should callsetExecutionContextName()
#3681 FaultTolerantChunkProcessor
does not collect metrics likeSimpleChunkProcessor
#3664FlatFileItemReaderBuilder
reports error "Only one LineTokenizer option may be configured" when none are. #3688- Default value of comment prefix in
FlatFileItemReaderBuilder
is inconsistent withFlatFileItemReader
#753 - Empty String as delimiter is ignored #770
- Regression due to the fix of BATCH-2442 #775
FlatFileItemReaderBuilder
does not overrule comment prefixes in returnedFlatFileItemReader
#779FlatFileItemWriterBuilder
requires 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-resources
version to 0.2.2 - Incorrect reference to stop method in documentation #3643
- Improve Javadoc of
ItemProcessor
regarding the nullability of input items #3648 - Misleading code example in reference documentation #3692
- The
ItemProcessor
section 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
AggregateItemReader
in "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.Alignment
enum #3778 - Deprecate
org.springframework.batch.item.xml.StaxUtils
#3779 - Deprecate the Map-based
JobRepository
/JobExplorer
implementations #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!