Move code from spring-boot-actuator to spring-boot-ldap
This commit is contained in:
committed by
Phillip Webb
parent
0e489acfdb
commit
22e09fb277
@@ -20,12 +20,12 @@ import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
|
||||
import org.springframework.boot.actuate.autoconfigure.health.CompositeHealthContributorConfiguration;
|
||||
import org.springframework.boot.actuate.autoconfigure.health.ConditionalOnEnabledHealthIndicator;
|
||||
import org.springframework.boot.actuate.health.HealthContributor;
|
||||
import org.springframework.boot.actuate.ldap.LdapHealthIndicator;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
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.context.annotation.Bean;
|
||||
import org.springframework.ldap.core.LdapOperations;
|
||||
|
||||
@@ -37,7 +37,7 @@ import org.springframework.ldap.core.LdapOperations;
|
||||
* @since 2.0.0
|
||||
*/
|
||||
@AutoConfiguration(afterName = "org.springframework.boot.ldap.autoconfigure.LdapAutoConfiguration")
|
||||
@ConditionalOnClass(LdapOperations.class)
|
||||
@ConditionalOnClass({ LdapOperations.class, LdapHealthIndicator.class })
|
||||
@ConditionalOnBean(LdapOperations.class)
|
||||
@ConditionalOnEnabledHealthIndicator("ldap")
|
||||
public class LdapHealthContributorAutoConfiguration
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2023 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -19,8 +19,8 @@ package org.springframework.boot.actuate.autoconfigure.ldap;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.health.HealthContributorAutoConfiguration;
|
||||
import org.springframework.boot.actuate.ldap.LdapHealthIndicator;
|
||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
import org.springframework.boot.ldap.actuate.health.LdapHealthIndicator;
|
||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||
import org.springframework.ldap.core.LdapOperations;
|
||||
|
||||
|
||||
@@ -73,7 +73,6 @@ dependencies {
|
||||
optional("org.springframework:spring-web")
|
||||
optional("org.springframework:spring-webmvc")
|
||||
optional("org.springframework.graphql:spring-graphql")
|
||||
optional("org.springframework.data:spring-data-ldap")
|
||||
optional("org.springframework.data:spring-data-rest-webmvc")
|
||||
optional("org.springframework.security:spring-security-core")
|
||||
optional("org.springframework.security:spring-security-web")
|
||||
|
||||
@@ -12,9 +12,13 @@ dependencies {
|
||||
api(project(":spring-boot-project:spring-boot"))
|
||||
api("org.springframework.ldap:spring-ldap-core")
|
||||
|
||||
compileOnly("com.fasterxml.jackson.core:jackson-annotations")
|
||||
|
||||
optional(project(":spring-boot-project:spring-boot-actuator"))
|
||||
optional(project(":spring-boot-project:spring-boot-autoconfigure"))
|
||||
optional("com.unboundid:unboundid-ldapsdk")
|
||||
|
||||
testCompileOnly("com.fasterxml.jackson.core:jackson-annotations")
|
||||
testImplementation(project(":spring-boot-project:spring-boot-test"))
|
||||
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.ldap;
|
||||
package org.springframework.boot.ldap.actuate.health;
|
||||
|
||||
import javax.naming.NamingException;
|
||||
import javax.naming.directory.DirContext;
|
||||
@@ -31,7 +31,7 @@ import org.springframework.util.Assert;
|
||||
*
|
||||
* @author Eddú Meléndez
|
||||
* @author Stephane Nicoll
|
||||
* @since 2.0.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public class LdapHealthIndicator extends AbstractHealthIndicator {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -15,6 +15,6 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Actuator support for LDAP.
|
||||
* Health integration for LDAP.
|
||||
*/
|
||||
package org.springframework.boot.actuate.ldap;
|
||||
package org.springframework.boot.ldap.actuate.health;
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2023 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.ldap;
|
||||
package org.springframework.boot.ldap.actuate.health;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
Reference in New Issue
Block a user