Closed
Description
Bug description
Depending on whether you create an instance of RepositoryItemReader
via :
- bean factory using
RepositoryItemReader
'safterPropertiesSet()
- or
RepositoryItemReaderBuilder
The validation won't be the same in the case of we set these 3 parameters : repository + methodName + sorts
- if we make an instance via
RepositoryItemReader
, callingafterPropertiesSet()
at the send, it's 🆗 - if we make an instance via
RepositoryItemReaderBuilder
, it's ❌ with this exception :java.lang.IllegalStateException: A name is required when saveState is set to true.
Environment
Spring Batch 4.3 / 5.0
Minimal Complete Reproducible example
Failing unit test : org.example.ReaderInitializerTest#init_reader_via_builder
,
that can be found in this project : https://github.com/ghusta/test-spring-batch-repository-item-reader-builder