mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Rename spring.data.mongo.repositories.enabled
Rename mongo to mongodb. Fixes gh-1966
This commit is contained in:
parent
670ba33bec
commit
2b57c5a4dd
@ -56,7 +56,7 @@ import com.mongodb.Mongo;
|
||||
@ConditionalOnClass({ Mongo.class, MongoRepository.class })
|
||||
@ConditionalOnMissingBean({ MongoRepositoryFactoryBean.class,
|
||||
MongoRepositoryConfigurationExtension.class })
|
||||
@ConditionalOnProperty(prefix = "spring.data.mongo.repositories", name = "enabled", havingValue = "true", matchIfMissing = true)
|
||||
@ConditionalOnProperty(prefix = "spring.data.mongodb.repositories", name = "enabled", havingValue = "true", matchIfMissing = true)
|
||||
@Import(MongoRepositoriesAutoConfigureRegistrar.class)
|
||||
@AutoConfigureAfter(MongoAutoConfiguration.class)
|
||||
public class MongoRepositoriesAutoConfiguration {
|
||||
|
@ -42,7 +42,7 @@
|
||||
"defaultValue": true
|
||||
},
|
||||
{
|
||||
"name": "spring.data.mongo.repositories.enabled",
|
||||
"name": "spring.data.mongodb.repositories.enabled",
|
||||
"type": "java.lang.Boolean",
|
||||
"description": "Automatically enable Mongo repositories.",
|
||||
"defaultValue": true
|
||||
|
@ -105,7 +105,7 @@ public class MixedMongoRepositoriesAutoConfigurationTests {
|
||||
this.context = new AnnotationConfigApplicationContext();
|
||||
EnvironmentTestUtils.addEnvironment(this.context,
|
||||
"spring.datasource.initialize:false",
|
||||
"spring.data.mongo.repositories.enabled:false");
|
||||
"spring.data.mongodb.repositories.enabled:false");
|
||||
this.context.register(OverlapConfiguration.class, BaseConfiguration.class);
|
||||
this.context.refresh();
|
||||
assertNotNull(this.context.getBean(CityRepository.class));
|
||||
|
@ -225,7 +225,7 @@ content into your application; rather pick only the properties that you need.
|
||||
spring.data.mongodb.grid-fs-database=
|
||||
spring.data.mongodb.username=
|
||||
spring.data.mongodb.password=
|
||||
spring.data.mongo.repositories.enabled=true # if spring data repository support is enabled
|
||||
spring.data.mongodb.repositories.enabled=true # if spring data repository support is enabled
|
||||
|
||||
# JPA ({sc-spring-boot-autoconfigure}/orm/jpa/JpaBaseConfiguration.{sc-ext}[JpaBaseConfiguration], {sc-spring-boot-autoconfigure}/orm/jpa/HibernateJpaAutoConfiguration.{sc-ext}[HibernateJpaAutoConfiguration])
|
||||
spring.jpa.properties.*= # properties to set on the JPA connection
|
||||
|
Loading…
Reference in New Issue
Block a user