Move Couchbase health auto-configuration into spring-boot-couchbase
This commit is contained in:
committed by
Phillip Webb
parent
8c7de6ea79
commit
79a842ec64
@@ -41,21 +41,6 @@
|
||||
"level": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "management.health.couchbase.enabled",
|
||||
"type": "java.lang.Boolean",
|
||||
"description": "Whether to enable Couchbase health check.",
|
||||
"defaultValue": true
|
||||
},
|
||||
{
|
||||
"name": "management.health.couchbase.timeout",
|
||||
"type": "java.time.Duration",
|
||||
"description": "Timeout for getting the Bucket information from the server.",
|
||||
"defaultValue": "1000ms",
|
||||
"deprecation": {
|
||||
"level": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "management.health.db.enabled",
|
||||
"type": "java.lang.Boolean",
|
||||
|
||||
@@ -8,8 +8,6 @@ org.springframework.boot.actuate.autoconfigure.cloudfoundry.servlet.CloudFoundry
|
||||
org.springframework.boot.actuate.autoconfigure.condition.ConditionsReportEndpointAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.context.properties.ConfigurationPropertiesReportEndpointAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.context.ShutdownEndpointAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.couchbase.CouchbaseHealthContributorAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.couchbase.CouchbaseReactiveHealthContributorAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.data.elasticsearch.ElasticsearchReactiveHealthContributorAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.data.mongo.MongoHealthContributorAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.data.mongo.MongoReactiveHealthContributorAutoConfiguration
|
||||
|
||||
@@ -13,7 +13,7 @@ dependencies {
|
||||
api(project(":spring-boot-project:spring-boot"))
|
||||
api("com.couchbase.client:java-client")
|
||||
|
||||
optional(project(":spring-boot-project:spring-boot-actuator"))
|
||||
optional(project(":spring-boot-project:spring-boot-actuator-autoconfigure"))
|
||||
optional(project(":spring-boot-project:spring-boot-autoconfigure"))
|
||||
optional(project(":spring-boot-project:spring-boot-jackson"))
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.couchbase;
|
||||
package org.springframework.boot.couchbase.actuate.health.autoconfigure;
|
||||
|
||||
import com.couchbase.client.java.Cluster;
|
||||
|
||||
@@ -28,6 +28,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.couchbase.actuate.health.CouchbaseHealthIndicator;
|
||||
import org.springframework.boot.couchbase.autoconfigure.CouchbaseAutoConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
/**
|
||||
@@ -37,11 +38,11 @@ import org.springframework.context.annotation.Bean;
|
||||
* @author Eddú Meléndez
|
||||
* @author Stephane Nicoll
|
||||
* @author Andy Wilkinson Nicoll
|
||||
* @since 2.0.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@AutoConfiguration(after = CouchbaseReactiveHealthContributorAutoConfiguration.class,
|
||||
afterName = "org.springframework.boot.couchbase.autoconfigure.CouchbaseAutoConfiguration")
|
||||
@ConditionalOnClass({ Cluster.class, CouchbaseHealthIndicator.class })
|
||||
@AutoConfiguration(
|
||||
after = { CouchbaseAutoConfiguration.class, CouchbaseReactiveHealthContributorAutoConfiguration.class })
|
||||
@ConditionalOnClass({ Cluster.class, CouchbaseHealthIndicator.class, ConditionalOnEnabledHealthIndicator.class })
|
||||
@ConditionalOnBean(Cluster.class)
|
||||
@ConditionalOnEnabledHealthIndicator("couchbase")
|
||||
public class CouchbaseHealthContributorAutoConfiguration
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.couchbase;
|
||||
package org.springframework.boot.couchbase.actuate.health.autoconfigure;
|
||||
|
||||
import com.couchbase.client.java.Cluster;
|
||||
import reactor.core.publisher.Flux;
|
||||
@@ -29,6 +29,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.couchbase.actuate.health.CouchbaseReactiveHealthIndicator;
|
||||
import org.springframework.boot.couchbase.autoconfigure.CouchbaseAutoConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
/**
|
||||
@@ -37,10 +38,11 @@ import org.springframework.context.annotation.Bean;
|
||||
*
|
||||
* @author Mikalai Lushchytski
|
||||
* @author Stephane Nicoll
|
||||
* @since 2.1.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@AutoConfiguration(afterName = "org.springframework.boot.couchbase.autoconfigure.CouchbaseAutoConfiguration")
|
||||
@ConditionalOnClass({ Cluster.class, Flux.class, CouchbaseReactiveHealthIndicator.class })
|
||||
@AutoConfiguration(after = CouchbaseAutoConfiguration.class)
|
||||
@ConditionalOnClass({ Cluster.class, Flux.class, CouchbaseReactiveHealthIndicator.class,
|
||||
ConditionalOnEnabledHealthIndicator.class })
|
||||
@ConditionalOnBean(Cluster.class)
|
||||
@ConditionalOnEnabledHealthIndicator("couchbase")
|
||||
public class CouchbaseReactiveHealthContributorAutoConfiguration
|
||||
@@ -17,4 +17,4 @@
|
||||
/**
|
||||
* Auto-configuration for actuator Couchbase concerns.
|
||||
*/
|
||||
package org.springframework.boot.actuate.autoconfigure.couchbase;
|
||||
package org.springframework.boot.couchbase.actuate.health.autoconfigure;
|
||||
@@ -1,6 +1,21 @@
|
||||
{
|
||||
"groups": [],
|
||||
"properties": [
|
||||
{
|
||||
"name": "management.health.couchbase.enabled",
|
||||
"type": "java.lang.Boolean",
|
||||
"description": "Whether to enable Couchbase health check.",
|
||||
"defaultValue": true
|
||||
},
|
||||
{
|
||||
"name": "management.health.couchbase.timeout",
|
||||
"type": "java.time.Duration",
|
||||
"description": "Timeout for getting the Bucket information from the server.",
|
||||
"defaultValue": "1000ms",
|
||||
"deprecation": {
|
||||
"level": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.couchbase.bootstrap-hosts",
|
||||
"type": "java.util.List<java.lang.String>",
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
org.springframework.boot.couchbase.actuate.health.autoconfigure.CouchbaseHealthContributorAutoConfiguration
|
||||
org.springframework.boot.couchbase.actuate.health.autoconfigure.CouchbaseReactiveHealthContributorAutoConfiguration
|
||||
org.springframework.boot.couchbase.autoconfigure.CouchbaseAutoConfiguration
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.couchbase;
|
||||
package org.springframework.boot.couchbase.actuate.health.autoconfigure;
|
||||
|
||||
import com.couchbase.client.java.Cluster;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.couchbase;
|
||||
package org.springframework.boot.couchbase.actuate.health.autoconfigure;
|
||||
|
||||
import com.couchbase.client.java.Cluster;
|
||||
import org.junit.jupiter.api.Test;
|
||||
Reference in New Issue
Block a user