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:
@@ -126,13 +126,12 @@ class JpaRepositoriesAutoConfigurationTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
void bootstrapModeIsDeferredByDefault() {
|
||||
void bootstrapModeIsDefaultByDefault() {
|
||||
this.contextRunner.withUserConfiguration(MultipleAsyncTaskExecutorConfiguration.class)
|
||||
.withConfiguration(AutoConfigurations.of(TaskExecutionAutoConfiguration.class,
|
||||
TaskSchedulingAutoConfiguration.class))
|
||||
.run((context) -> assertThat(
|
||||
context.getBean(LocalContainerEntityManagerFactoryBean.class).getBootstrapExecutor())
|
||||
.isEqualTo(context.getBean("applicationTaskExecutor")));
|
||||
context.getBean(LocalContainerEntityManagerFactoryBean.class).getBootstrapExecutor()).isNull());
|
||||
}
|
||||
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
|
||||
Reference in New Issue
Block a user