mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-10-06 09:19:19 +00:00
Merge branch '4.0.x'
Closes gh-49523
This commit is contained in:
+7
-16
@@ -737,6 +737,13 @@ class HibernateJpaAutoConfigurationTests {
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
void beanContainerIsConfiguredByDefault() {
|
||||
this.contextRunner.run((context) -> assertThat(
|
||||
context.getBean(LocalContainerEntityManagerFactoryBean.class).getJpaPropertyMap())
|
||||
.containsKey(ManagedBeanSettings.BEAN_CONTAINER));
|
||||
}
|
||||
|
||||
@Test
|
||||
@WithResource(name = "city.sql",
|
||||
content = "INSERT INTO CITY (ID, NAME, STATE, COUNTRY, MAP) values (2000, 'Washington', 'DC', 'US', 'Google')")
|
||||
@@ -753,12 +760,6 @@ class HibernateJpaAutoConfigurationTests {
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
void hibernatePropertiesCustomizerCanDisableBeanContainer() {
|
||||
this.contextRunner.withUserConfiguration(DisableBeanContainerConfiguration.class)
|
||||
.run((context) -> assertThat(context).doesNotHaveBean(City.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
void vendorPropertiesWithEmbeddedDatabaseAndNoDdlProperty() {
|
||||
this.contextRunner.run(vendorProperties((vendorProperties) -> {
|
||||
@@ -1258,16 +1259,6 @@ class HibernateJpaAutoConfigurationTests {
|
||||
|
||||
}
|
||||
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
static class DisableBeanContainerConfiguration {
|
||||
|
||||
@Bean
|
||||
HibernatePropertiesCustomizer disableBeanContainerHibernatePropertiesCustomizer() {
|
||||
return (hibernateProperties) -> hibernateProperties.remove(ManagedBeanSettings.BEAN_CONTAINER);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static class TestJtaPlatform implements JtaPlatform {
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user