Closed
Description
Scenario
When a user autowires JobBuilderFactory
and StepBuilderFactory
in a Java configuration where one of the beans required by the batch application is in the same configuration, boot throws a BeanCurrentlyInCreationException
.
Starting in Spring Boot 2.6.M2, boot checks for circular references by default ( spring.main.allow-circular-references=false
) . In previous releases of spring boot the spring.main.allow-circular-references
was defaulted to true.
Sample Application
A sample application can be found here: https://github.com/cppwfs/batchsamp
EDIT: Related SO thread: https://stackoverflow.com/questions/69379794