-
Notifications
You must be signed in to change notification settings - Fork 40.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable database initializers when an embedded database is detected #8981
Comments
Even though automatically enabled database initializers are helpful to get things up and running quickly I agree that this is somewhat nasty and not desirable in serious environments where you'd want to be explicit and fully in control of schema creation. IMO Spring Boot defaults should align with that approach. Enabling database initializers for an embedded datasource sounds nice and it's also consistent with approach used for |
Let's reuse the code we use for Hibernate's ddl-auto flag. And perhaps we should use an enum rather than an enum? ( |
See also #9048 for another initializer bug. |
@philwebb any reason you linked that issue to this one? I don't get how they are related. |
@snicoll I just linked them so we're aware that we'll likely need to touch that code for another reason as well. I thought it might effect the design. |
Also, I think we should revisit the |
Closing in favour of PR #9752 |
* pr/9752: Polish "Harmonize database initializers" Harmonize database initializers
We currently expose database initializers for Spring Batch, Spring Session and Spring Integration JDBC. While the first two are mandatory, the latter is only really required if you start using some of the features.
While working on #8881, we realized that having them enabled by default can be a bit nasty (especially for Spring Integration) so it is disabled now by default.
I think the other two should probably have a mode. Or they should only be enabled automatically if an embedded datasource is detected.
The text was updated successfully, but these errors were encountered: