Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Uu7q8vPeREyT4218EJPzz1
16 lines
588 B
Plaintext
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
|