Move LDAP health auto-configuration into spring-boot-ldap
This commit is contained in:
committed by
Phillip Webb
parent
df7afc5aac
commit
ec48e45c62
@@ -44,7 +44,6 @@ dependencies {
|
||||
optional(project(":spring-boot-project:spring-boot-jetty"))
|
||||
optional(project(":spring-boot-project:spring-boot-jsonb"))
|
||||
optional(project(":spring-boot-project:spring-boot-kafka"))
|
||||
optional(project(":spring-boot-project:spring-boot-ldap"))
|
||||
optional(project(":spring-boot-project:spring-boot-liquibase"))
|
||||
optional(project(":spring-boot-project:spring-boot-mail"))
|
||||
optional(project(":spring-boot-project:spring-boot-mongodb"))
|
||||
@@ -148,7 +147,6 @@ dependencies {
|
||||
optional("org.springframework.batch:spring-batch-core")
|
||||
optional("org.springframework.data:spring-data-couchbase")
|
||||
optional("org.springframework.data:spring-data-jpa")
|
||||
optional("org.springframework.data:spring-data-ldap")
|
||||
optional("org.springframework.data:spring-data-mongodb")
|
||||
optional("org.springframework.data:spring-data-redis")
|
||||
optional("org.springframework.graphql:spring-graphql")
|
||||
|
||||
@@ -59,12 +59,6 @@
|
||||
"description": "Whether to enable InfluxDB health check.",
|
||||
"defaultValue": true
|
||||
},
|
||||
{
|
||||
"name": "management.health.ldap.enabled",
|
||||
"type": "java.lang.Boolean",
|
||||
"description": "Whether to enable LDAP health check.",
|
||||
"defaultValue": true
|
||||
},
|
||||
{
|
||||
"name": "management.health.livenessstate.enabled",
|
||||
"type": "java.lang.Boolean",
|
||||
|
||||
@@ -16,7 +16,6 @@ org.springframework.boot.actuate.autoconfigure.endpoint.jackson.JacksonEndpointA
|
||||
org.springframework.boot.actuate.autoconfigure.endpoint.jmx.JmxEndpointAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.env.EnvironmentEndpointAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.integration.IntegrationGraphEndpointAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.ldap.LdapHealthContributorAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.liquibase.LiquibaseEndpointAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.logging.LogFileWebEndpointAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.logging.LoggersEndpointAutoConfiguration
|
||||
|
||||
@@ -14,7 +14,7 @@ dependencies {
|
||||
|
||||
compileOnly("com.fasterxml.jackson.core:jackson-annotations")
|
||||
|
||||
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("com.unboundid:unboundid-ldapsdk")
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.ldap;
|
||||
package org.springframework.boot.ldap.actuate.health.autoconfigure;
|
||||
|
||||
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
|
||||
import org.springframework.boot.actuate.autoconfigure.health.CompositeHealthContributorConfiguration;
|
||||
@@ -26,6 +26,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.ldap.actuate.health.LdapHealthIndicator;
|
||||
import org.springframework.boot.ldap.autoconfigure.LdapAutoConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.ldap.core.LdapOperations;
|
||||
|
||||
@@ -36,8 +37,8 @@ import org.springframework.ldap.core.LdapOperations;
|
||||
* @author Stephane Nicoll
|
||||
* @since 2.0.0
|
||||
*/
|
||||
@AutoConfiguration(afterName = "org.springframework.boot.ldap.autoconfigure.LdapAutoConfiguration")
|
||||
@ConditionalOnClass({ LdapOperations.class, LdapHealthIndicator.class })
|
||||
@AutoConfiguration(after = LdapAutoConfiguration.class)
|
||||
@ConditionalOnClass({ LdapOperations.class, LdapHealthIndicator.class, ConditionalOnEnabledHealthIndicator.class })
|
||||
@ConditionalOnBean(LdapOperations.class)
|
||||
@ConditionalOnEnabledHealthIndicator("ldap")
|
||||
public class LdapHealthContributorAutoConfiguration
|
||||
@@ -15,6 +15,6 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Auto-configuration for actuator LDAP concerns.
|
||||
* Auto-configuration for LDAP health integration.
|
||||
*/
|
||||
package org.springframework.boot.actuate.autoconfigure.ldap;
|
||||
package org.springframework.boot.ldap.actuate.health.autoconfigure;
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"properties": [
|
||||
{
|
||||
"name": "management.health.ldap.enabled",
|
||||
"type": "java.lang.Boolean",
|
||||
"description": "Whether to enable LDAP health check.",
|
||||
"defaultValue": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,2 +1,3 @@
|
||||
org.springframework.boot.ldap.actuate.health.autoconfigure.LdapHealthContributorAutoConfiguration
|
||||
org.springframework.boot.ldap.autoconfigure.LdapAutoConfiguration
|
||||
org.springframework.boot.ldap.autoconfigure.embedded.EmbeddedLdapAutoConfiguration
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.ldap;
|
||||
package org.springframework.boot.ldap.actuate.health.autoconfigure;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
Reference in New Issue
Block a user