Files
spring-boot-demo/core-beans/output/24-allow-circular-half-built-bean.txt

16 lines
588 B
Plaintext

# A field-injected cycle with spring.main.allow-circular-references=true: what each @PostConstruct sees
--- flag off (the Boot default) ---
started: false
root cause: Error creating bean with name 'firstService': Requested bean is currently in creation: Is there an unresolvable circular reference or an asynchronous initialization dependency?
--- flag on ---
started: true
start creating firstService
FirstService constructed
start creating secondService
SecondService constructed
SecondService @PostConstruct sees first.isReady() = false
FirstService @PostConstruct done, ready=true