-
Notifications
You must be signed in to change notification settings - Fork 41.6k
Closed
Description
Spring Boot 2.1 exposes a property spring.data.jpa.repositories.bootstrap-mode that can be set to default (default) deferred or lazy. I suggest do change the default value for property to be changed in the following scenarios:
- Change the general default to
deferred– it parallelizes the bootstrap of theEntityManagerFactoryand delays repository initialization to the end of theApplicationContextinitialization. I.e. there are performance benefits to the startup but the app is the same state as with the current default once it has been started. - Default to
lazyfor@SpringBootTest,@DataJpaTest– this leaves all but repositories injected into the tests initialized which gives a bit of a performance boost in both scenarios.
kamkie, desmethans, sergey-morenets, derTobsch, ismakc and 1 more
Metadata
Metadata
Assignees
Labels
type: enhancementA general enhancementA general enhancement