Skip to content

Add @Odered to event listener in SpringDocAppInitializer #3151

@WeisSebastian

Description

@WeisSebastian

Is your feature request related to a problem? Please describe.

The EventListener in SpringDocAppInitializer added with 2.8.14, which i appreciate because it highlights a potential issue for us, is causing some problems for us. In our application we have a listener on ApplicationReadyEvent that shuts the application down. This is used in our installation process to start the application, let database migration scripts run and then shut it down again when they are finished.
However this seems to consistently happen before the EventListener introduced in 2.8.14 is called, causing an IllegalStateException because the context is already closed.
I propose adding @Ordered to your EventListener to allow consumers of the library to better control when the newly introduced event listener is called

Describe the solution you'd like

Add @Ordered to the EventListener in SpringDocAppInitializer

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions