Stop deferring JPA bootstrap mode by default

This commit changes the default value of bootstrap-mode to "default"
rather than "deferred" so that the JPA infrastructure starts in the
main thread rather than asynchronously.

Closes gh-24249
This commit is contained in:
Stephane Nicoll
2020-12-08 15:42:14 +01:00
parent f84cb1b765
commit 06671aa50e
7 changed files with 12 additions and 12 deletions

View File

@@ -3839,6 +3839,8 @@ To enable deferred or lazy bootstrapping, set the configprop:spring.data.jpa.rep
When using deferred or lazy bootstrapping, the auto-configured `EntityManagerFactoryBuilder` will use the context's `AsyncTaskExecutor`, if any, as the bootstrap executor.
If more than one exists, the one named `applicationTaskExecutor` will be used.
NOTE: When using deferred or lazy bootstraping, make sure to defer any access to the JPA infrastructure after the application context bootstrap phase.
TIP: We have barely scratched the surface of Spring Data JPA.
For complete details, see the {spring-data-jdbc-docs}[Spring Data JPA reference documentation].