mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-10-01 14:59:50 +00:00
Merge branch '2.4.x' into 2.5.x
Closes gh-28482
This commit is contained in:
+10
-2
@@ -147,13 +147,21 @@ class MongoDataAutoConfigurationTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
void customAutoIndexCreation() {
|
||||
this.contextRunner.withPropertyValues("spring.data.mongodb.autoIndexCreation:false").run((context) -> {
|
||||
void defaultAutoIndexCreation() {
|
||||
this.contextRunner.run((context) -> {
|
||||
MongoMappingContext mappingContext = context.getBean(MongoMappingContext.class);
|
||||
assertThat(mappingContext.isAutoIndexCreation()).isFalse();
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
void customAutoIndexCreation() {
|
||||
this.contextRunner.withPropertyValues("spring.data.mongodb.autoIndexCreation:true").run((context) -> {
|
||||
MongoMappingContext mappingContext = context.getBean(MongoMappingContext.class);
|
||||
assertThat(mappingContext.isAutoIndexCreation()).isTrue();
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
void interfaceFieldNamingStrategy() {
|
||||
this.contextRunner
|
||||
|
||||
Reference in New Issue
Block a user