diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/MongoProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/MongoProperties.java index 57addc9166..79417b0b40 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/MongoProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/MongoProperties.java @@ -92,7 +92,7 @@ public class MongoProperties { private Class fieldNamingStrategy; /** - * Enables/disables auto-index creation. + * Whether to enable auto-index creation. */ private Boolean autoIndexCreation; diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/mongo/MongoDataAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/mongo/MongoDataAutoConfigurationTests.java index 27623dcaf7..e3b36b53b9 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/mongo/MongoDataAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/mongo/MongoDataAutoConfigurationTests.java @@ -135,12 +135,12 @@ public class MongoDataAutoConfigurationTests { @Test public void customAutoIndexCreation() { this.contextRunner - .withPropertyValues("spring.data.mongodb.autoIndexCreation:true") + .withPropertyValues("spring.data.mongodb.autoIndexCreation:false") .run((context) -> { MongoMappingContext mappingContext = context .getBean(MongoMappingContext.class); assertThat(mappingContext.isAutoIndexCreation()) - .isEqualTo(Boolean.TRUE); + .isEqualTo(Boolean.FALSE); }); }