mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-17 12:09:16 +00:00
Use mongodb consistently in property names
Closes gh-47050
This commit is contained in:
+1
-1
@@ -41,7 +41,7 @@ import org.springframework.data.mongodb.core.MongoTemplate;
|
||||
MongoAutoConfiguration.class })
|
||||
@ConditionalOnClass({ MongoTemplate.class, MongoHealthIndicator.class, ConditionalOnEnabledHealthIndicator.class })
|
||||
@ConditionalOnBean(MongoTemplate.class)
|
||||
@ConditionalOnEnabledHealthIndicator("mongo")
|
||||
@ConditionalOnEnabledHealthIndicator("mongodb")
|
||||
public final class MongoHealthContributorAutoConfiguration
|
||||
extends CompositeHealthContributorConfiguration<MongoHealthIndicator, MongoTemplate> {
|
||||
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ import org.springframework.data.mongodb.core.ReactiveMongoTemplate;
|
||||
@ConditionalOnClass({ ReactiveMongoTemplate.class, Flux.class, MongoReactiveHealthIndicator.class,
|
||||
ConditionalOnEnabledHealthIndicator.class })
|
||||
@ConditionalOnBean(ReactiveMongoTemplate.class)
|
||||
@ConditionalOnEnabledHealthIndicator("mongo")
|
||||
@ConditionalOnEnabledHealthIndicator("mongodb")
|
||||
public final class MongoReactiveHealthContributorAutoConfiguration
|
||||
extends CompositeReactiveHealthContributorConfiguration<MongoReactiveHealthIndicator, ReactiveMongoTemplate> {
|
||||
|
||||
|
||||
+9
-1
@@ -1,7 +1,15 @@
|
||||
{
|
||||
"properties": [
|
||||
{
|
||||
{
|
||||
"name": "management.health.mongo.enabled",
|
||||
"deprecation": {
|
||||
"level": "error",
|
||||
"replacement": "management.health.mongodb.enabled",
|
||||
"since": "4.0.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "management.health.mongodb.enabled",
|
||||
"type": "java.lang.Boolean",
|
||||
"description": "Whether to enable MongoDB health check.",
|
||||
"defaultValue": true
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@ class MongoHealthContributorAutoConfigurationTests {
|
||||
|
||||
@Test
|
||||
void runWhenDisabledShouldNotCreateIndicator() {
|
||||
this.contextRunner.withPropertyValues("management.health.mongo.enabled:false")
|
||||
this.contextRunner.withPropertyValues("management.health.mongodb.enabled:false")
|
||||
.run((context) -> assertThat(context).doesNotHaveBean(MongoHealthIndicator.class));
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@ class MongoReactiveHealthContributorAutoConfigurationTests {
|
||||
|
||||
@Test
|
||||
void runWhenDisabledShouldNotCreateIndicator() {
|
||||
this.contextRunner.withPropertyValues("management.health.mongo.enabled:false")
|
||||
this.contextRunner.withPropertyValues("management.health.mongodb.enabled:false")
|
||||
.run((context) -> assertThat(context).doesNotHaveBean(MongoReactiveHealthIndicator.class)
|
||||
.doesNotHaveBean("mongoHealthContributor"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user