Skip to content

Conversation

@ishankhemani
Copy link

Description

This PR fixes the await logic in AwaitingNonWebApplicationListener for
non-web Spring Boot applications using parent–child ApplicationContext
hierarchies.

Previously, the listener could incorrectly participate in the lifecycle when a
child context was present. The listener should only operate on the root,
non-web ApplicationContext, and must ignore child contexts.

Changes

Ensure onApplicationReadyEvent returns early for:

non-root ApplicationContexts

web ApplicationContexts

Add a regression test to verify correct behavior when a non-web application
has a parent–child context hierarchy

Testing

Added testMultipleContextNonWebApplication

Verified that the listener does not enter await state for child contexts

Fixes #13722

@zrlw
Copy link
Contributor

zrlw commented Jan 7, 2026

duplicated with #15971

@zrlw zrlw closed this Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AwaitingNonWebApplicationListener bug

2 participants