I have an app that need to be notified on Schema Created which was in spring autoconfigure old versions
DataSourceSchemaCreatedEvent was deprecated since 2.5.0 with no replacement.
Deprecated
since 2.5.0 for removal in 2.7.0 with no replacement as the event is no longer published
Is there any way to achieve such a task using maybe another event?
Comment From: wilkinsona
It's hard to say without knowing what you were doing upon schema creation. You may be able to use @DependsOnDatabaseInitialization on a@Bean method to ensure that the database has been initialized before the bean is created.
Comment From: Blacktoviche
I'm preparing the database with some custom configuration. is @DependsOnDatabaseInitialization the same as DataSourceSchemaCreatedEvent? I mean doing the same job ?
I'm gonna try it. Thanks
Comment From: wilkinsona
It's not exactly the same, no. Any bean that is annotated with @DependsOnDatabaseInitialization won't be created until the database has been initiallized. For example, it won't be created until Hibernate has created the schema, or Flyway has migrated the database, etc. Please let us know how you get on.
Comment From: spring-projects-issues
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Comment From: spring-projects-issues
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.