Skip to content

Circular reference error when autowiring JobBuilderFactoryΒ #3991

Closed

Description

@cppwfs

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

Activity

  1. added
    has: minimal-exampleBug reports that provide a minimal complete reproducible example
    and removed on Sep 8, 2021
  2. added this to the 5.0.0 milestone on Sep 8, 2021
  3. added a commit that references this issue on Sep 16, 2021
  4. modified the milestones: 5.0.0, 5.0.0-M3 on May 13, 2022
  5. added a commit that references this issue on Feb 15, 2024
    33338a4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions