Create spring-boot-ldap module

See gh-46108
This commit is contained in:
Stéphane Nicoll 2025-03-25 09:10:55 +01:00 committed by Andy Wilkinson
parent ba445c5645
commit 3c4c644f52
38 changed files with 91 additions and 41 deletions

View File

@ -87,6 +87,7 @@ include "spring-boot-project:spring-boot-jooq"
include "spring-boot-project:spring-boot-jpa"
include "spring-boot-project:spring-boot-jsonb"
include "spring-boot-project:spring-boot-kafka"
include "spring-boot-project:spring-boot-ldap"
include "spring-boot-project:spring-boot-liquibase"
include "spring-boot-project:spring-boot-neo4j"
include "spring-boot-project:spring-boot-mail"

View File

@ -48,6 +48,7 @@ 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-neo4j"))

View File

@ -26,7 +26,6 @@ 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.autoconfigure.ldap.LdapAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.ldap.core.LdapOperations;
@ -37,7 +36,7 @@ import org.springframework.ldap.core.LdapOperations;
* @author Stephane Nicoll
* @since 2.0.0
*/
@AutoConfiguration(after = LdapAutoConfiguration.class)
@AutoConfiguration(afterName = "org.springframework.boot.ldap.autoconfigure.LdapAutoConfiguration")
@ConditionalOnClass(LdapOperations.class)
@ConditionalOnBean(LdapOperations.class)
@ConditionalOnEnabledHealthIndicator("ldap")

View File

@ -69,6 +69,7 @@ dependencies {
optional(project(":spring-boot-project:spring-boot-jackson"))
optional(project(":spring-boot-project:spring-boot-jdbc"))
optional(project(":spring-boot-project:spring-boot-jsonb"))
optional(project(":spring-boot-project:spring-boot-ldap"))
optional(project(":spring-boot-project:spring-boot-liquibase"))
optional(project(":spring-boot-project:spring-boot-neo4j"))
optional(project(":spring-boot-project:spring-boot-r2dbc"))

View File

@ -50,8 +50,6 @@ org.springframework.boot.autoconfigure.http.client.reactive.ClientHttpConnectorA
org.springframework.boot.autoconfigure.http.client.reactive.service.ReactiveHttpServiceClientAutoConfiguration
org.springframework.boot.autoconfigure.http.codec.CodecsAutoConfiguration
org.springframework.boot.autoconfigure.jersey.JerseyAutoConfiguration
org.springframework.boot.autoconfigure.ldap.embedded.EmbeddedLdapAutoConfiguration
org.springframework.boot.autoconfigure.ldap.LdapAutoConfiguration
org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration
org.springframework.boot.autoconfigure.mongo.MongoReactiveAutoConfiguration
org.springframework.boot.autoconfigure.netty.NettyAutoConfiguration

View File

@ -25,7 +25,7 @@ import org.springframework.boot.autoconfigure.data.alt.ldap.PersonLdapRepository
import org.springframework.boot.autoconfigure.data.empty.EmptyDataPackage;
import org.springframework.boot.autoconfigure.data.ldap.person.Person;
import org.springframework.boot.autoconfigure.data.ldap.person.PersonRepository;
import org.springframework.boot.autoconfigure.ldap.LdapAutoConfiguration;
import org.springframework.boot.ldap.autoconfigure.LdapAutoConfiguration;
import org.springframework.boot.test.util.TestPropertyValues;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Configuration;

View File

@ -2014,6 +2014,7 @@ bom {
"spring-boot-jpa",
"spring-boot-jsonb",
"spring-boot-kafka",
"spring-boot-ldap",
"spring-boot-liquibase",
"spring-boot-loader",
"spring-boot-loader-classic",

View File

@ -60,6 +60,7 @@ dependencies {
optional(project(":spring-boot-project:spring-boot-flyway"))
optional(project(":spring-boot-project:spring-boot-hazelcast"))
optional(project(":spring-boot-project:spring-boot-jdbc"))
optional(project(":spring-boot-project:spring-boot-ldap"))
optional(project(":spring-boot-project:spring-boot-liquibase"))
optional(project(":spring-boot-project:spring-boot-neo4j"))
optional(project(":spring-boot-project:spring-boot-pulsar"))

View File

@ -16,8 +16,8 @@
package org.springframework.boot.docker.compose.service.connection.ldap;
import org.springframework.boot.autoconfigure.ldap.LdapConnectionDetails;
import org.springframework.boot.docker.compose.service.connection.test.DockerComposeTest;
import org.springframework.boot.ldap.autoconfigure.LdapConnectionDetails;
import org.springframework.boot.testsupport.container.TestImage;
import static org.assertj.core.api.Assertions.assertThat;

View File

@ -16,8 +16,8 @@
package org.springframework.boot.docker.compose.service.connection.ldap;
import org.springframework.boot.autoconfigure.ldap.LdapConnectionDetails;
import org.springframework.boot.docker.compose.service.connection.test.DockerComposeTest;
import org.springframework.boot.ldap.autoconfigure.LdapConnectionDetails;
import org.springframework.boot.testsupport.container.TestImage;
import static org.assertj.core.api.Assertions.assertThat;

View File

@ -18,10 +18,10 @@ package org.springframework.boot.docker.compose.service.connection.ldap;
import java.util.Map;
import org.springframework.boot.autoconfigure.ldap.LdapConnectionDetails;
import org.springframework.boot.docker.compose.core.RunningService;
import org.springframework.boot.docker.compose.service.connection.DockerComposeConnectionDetailsFactory;
import org.springframework.boot.docker.compose.service.connection.DockerComposeConnectionSource;
import org.springframework.boot.ldap.autoconfigure.LdapConnectionDetails;
/**
* {@link DockerComposeConnectionDetailsFactory} to create {@link LdapConnectionDetails}

View File

@ -20,10 +20,10 @@ import java.util.Arrays;
import java.util.Map;
import java.util.stream.Collectors;
import org.springframework.boot.autoconfigure.ldap.LdapConnectionDetails;
import org.springframework.boot.docker.compose.core.RunningService;
import org.springframework.boot.docker.compose.service.connection.DockerComposeConnectionDetailsFactory;
import org.springframework.boot.docker.compose.service.connection.DockerComposeConnectionSource;
import org.springframework.boot.ldap.autoconfigure.LdapConnectionDetails;
/**
* {@link DockerComposeConnectionDetailsFactory} to create {@link LdapConnectionDetails}

View File

@ -99,6 +99,7 @@ dependencies {
autoConfiguration(project(path: ":spring-boot-project:spring-boot-jpa", configuration: "autoConfigurationMetadata"))
autoConfiguration(project(path: ":spring-boot-project:spring-boot-jsonb", configuration: "autoConfigurationMetadata"))
autoConfiguration(project(path: ":spring-boot-project:spring-boot-kafka", configuration: "autoConfigurationMetadata"))
autoConfiguration(project(path: ":spring-boot-project:spring-boot-ldap", configuration: "autoConfigurationMetadata"))
autoConfiguration(project(path: ":spring-boot-project:spring-boot-liquibase", configuration: "autoConfigurationMetadata"))
autoConfiguration(project(path: ":spring-boot-project:spring-boot-mail", configuration: "autoConfigurationMetadata"))
autoConfiguration(project(path: ":spring-boot-project:spring-boot-mustache", configuration: "autoConfigurationMetadata"))
@ -140,6 +141,7 @@ dependencies {
configurationProperties(project(path: ":spring-boot-project:spring-boot-jetty", configuration: "configurationPropertiesMetadata"))
configurationProperties(project(path: ":spring-boot-project:spring-boot-jms", configuration: "configurationPropertiesMetadata"))
configurationProperties(project(path: ":spring-boot-project:spring-boot-kafka", configuration: "configurationPropertiesMetadata"))
configurationProperties(project(path: ":spring-boot-project:spring-boot-ldap", configuration: "configurationPropertiesMetadata"))
configurationProperties(project(path: ":spring-boot-project:spring-boot-liquibase", configuration: "configurationPropertiesMetadata"))
configurationProperties(project(path: ":spring-boot-project:spring-boot-mail", configuration: "configurationPropertiesMetadata"))
configurationProperties(project(path: ":spring-boot-project:spring-boot-mustache", configuration: "configurationPropertiesMetadata"))
@ -170,6 +172,7 @@ dependencies {
implementation(project(path: ":spring-boot-project:spring-boot-jpa"))
implementation(project(path: ":spring-boot-project:spring-boot-jms"))
implementation(project(path: ":spring-boot-project:spring-boot-jsonb"))
implementation(project(path: ":spring-boot-project:spring-boot-ldap"))
implementation(project(path: ":spring-boot-project:spring-boot-reactor-netty"))
implementation(project(path: ":spring-boot-project:spring-boot-r2dbc"))
implementation(project(path: ":spring-boot-project:spring-boot-test"))

View File

@ -101,7 +101,7 @@ The following service connections are currently supported:
| javadoc:org.springframework.boot.autoconfigure.jdbc.JdbcConnectionDetails[]
| Containers named "clickhouse/clickhouse-server", "bitnami/clickhouse", "gvenzl/oracle-free", "gvenzl/oracle-xe", "mariadb", "bitnami/mariadb", "mssql/server", "mysql", "bitnami/mysql", "postgres", or "bitnami/postgresql"
| javadoc:org.springframework.boot.autoconfigure.ldap.LdapConnectionDetails[]
| javadoc:org.springframework.boot.ldap.autoconfigure.LdapConnectionDetails[]
| Containers named "osixia/openldap", "lldap/lldap"
| javadoc:org.springframework.boot.autoconfigure.mongo.MongoConnectionDetails[]

View File

@ -143,7 +143,7 @@ The following service connection factories are provided in the `spring-boot-test
| javadoc:org.springframework.boot.autoconfigure.kafka.KafkaConnectionDetails[]
| Containers of type javadoc:org.testcontainers.kafka.KafkaContainer[], javadoc:org.testcontainers.kafka.ConfluentKafkaContainer[] or javadoc:org.testcontainers.redpanda.RedpandaContainer[]
| javadoc:org.springframework.boot.autoconfigure.ldap.LdapConnectionDetails[]
| javadoc:org.springframework.boot.ldap.autoconfigure.LdapConnectionDetails[]
| Containers named "osixia/openldap" or of type javadoc:org.testcontainers.ldap.LLdapContainer[]
| javadoc:org.springframework.boot.autoconfigure.liquibase.LiquibaseConnectionDetails[]

View File

@ -16,7 +16,7 @@
package org.springframework.boot.docs.testing.springbootapplications.autoconfiguredspringdataldap.server;
import org.springframework.boot.autoconfigure.ldap.embedded.EmbeddedLdapAutoConfiguration;
import org.springframework.boot.ldap.autoconfigure.embedded.EmbeddedLdapAutoConfiguration;
import org.springframework.boot.test.autoconfigure.data.ldap.DataLdapTest;
@DataLdapTest(excludeAutoConfiguration = EmbeddedLdapAutoConfiguration.class)

View File

@ -16,7 +16,7 @@
package org.springframework.boot.docs.testing.springbootapplications.autoconfiguredspringdataldap.server
import org.springframework.boot.autoconfigure.ldap.embedded.EmbeddedLdapAutoConfiguration
import org.springframework.boot.ldap.autoconfigure.embedded.EmbeddedLdapAutoConfiguration
import org.springframework.boot.test.autoconfigure.data.ldap.DataLdapTest
@DataLdapTest(excludeAutoConfiguration = [EmbeddedLdapAutoConfiguration::class])

View File

@ -0,0 +1,40 @@
/*
* Copyright 2012-present 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
plugins {
id "java-library"
id "org.springframework.boot.auto-configuration"
id "org.springframework.boot.configuration-properties"
id "org.springframework.boot.deployed"
id "org.springframework.boot.optional-dependencies"
}
description = "Spring Boot LDAP"
dependencies {
api(project(":spring-boot-project:spring-boot"))
api("org.springframework.ldap:spring-ldap-core")
optional(project(":spring-boot-project:spring-boot-autoconfigure"))
optional("com.unboundid:unboundid-ldapsdk")
testImplementation(project(":spring-boot-project:spring-boot-test"))
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
testRuntimeOnly("ch.qos.logback:logback-classic")
testRuntimeOnly("org.apache.commons:commons-pool2")
}

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.ldap;
package org.springframework.boot.ldap.autoconfigure;
import java.util.Collections;
import java.util.Locale;
@ -24,10 +24,10 @@ import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.ldap.LdapProperties.Template;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.context.properties.PropertyMapper;
import org.springframework.boot.convert.ApplicationConversionService;
import org.springframework.boot.ldap.autoconfigure.LdapProperties.Template;
import org.springframework.context.annotation.Bean;
import org.springframework.core.env.Environment;
import org.springframework.ldap.convert.ConverterUtils;
@ -44,7 +44,7 @@ import org.springframework.ldap.odm.core.impl.DefaultObjectDirectoryMapper;
*
* @author Eddú Meléndez
* @author Vedran Pavic
* @since 1.5.0
* @since 4.0.0
*/
@AutoConfiguration
@ConditionalOnClass(ContextSource.class)

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.ldap;
package org.springframework.boot.ldap.autoconfigure;
import org.springframework.boot.autoconfigure.service.connection.ConnectionDetails;
@ -22,7 +22,7 @@ import org.springframework.boot.autoconfigure.service.connection.ConnectionDetai
* Details required to establish a connection to an LDAP service.
*
* @author Philipp Kessler
* @since 3.3.0
* @since 4.0.0
*/
public interface LdapConnectionDetails extends ConnectionDetails {

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.ldap;
package org.springframework.boot.ldap.autoconfigure;
import java.util.HashMap;
import java.util.Map;
@ -30,7 +30,7 @@ import org.springframework.util.ObjectUtils;
* Configuration properties for LDAP.
*
* @author Eddú Meléndez
* @since 1.5.0
* @since 4.0.0
*/
@ConfigurationProperties("spring.ldap")
public class LdapProperties {

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.ldap;
package org.springframework.boot.ldap.autoconfigure;
import org.springframework.core.env.Environment;

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.ldap.embedded;
package org.springframework.boot.ldap.autoconfigure.embedded;
import java.io.InputStream;
import java.util.Collections;
@ -40,12 +40,12 @@ import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
import org.springframework.boot.autoconfigure.ldap.LdapAutoConfiguration;
import org.springframework.boot.autoconfigure.ldap.LdapProperties;
import org.springframework.boot.autoconfigure.ldap.embedded.EmbeddedLdapAutoConfiguration.EmbeddedLdapAutoConfigurationRuntimeHints;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.context.properties.bind.Bindable;
import org.springframework.boot.context.properties.bind.Binder;
import org.springframework.boot.ldap.autoconfigure.LdapAutoConfiguration;
import org.springframework.boot.ldap.autoconfigure.LdapProperties;
import org.springframework.boot.ldap.autoconfigure.embedded.EmbeddedLdapAutoConfiguration.EmbeddedLdapAutoConfigurationRuntimeHints;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean;
@ -70,7 +70,7 @@ import org.springframework.util.StringUtils;
* @author Eddú Meléndez
* @author Mathieu Ouellet
* @author Raja Kolli
* @since 1.5.0
* @since 4.0.0
*/
@AutoConfiguration(before = LdapAutoConfiguration.class)
@EnableConfigurationProperties({ LdapProperties.class, EmbeddedLdapProperties.class })

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.ldap.embedded;
package org.springframework.boot.ldap.autoconfigure.embedded;
import java.util.ArrayList;
import java.util.List;
@ -29,7 +29,7 @@ import org.springframework.util.StringUtils;
*
* @author Eddú Meléndez
* @author Mathieu Ouellet
* @since 1.5.0
* @since 4.0.0
*/
@ConfigurationProperties("spring.ldap.embedded")
public class EmbeddedLdapProperties {

View File

@ -17,4 +17,4 @@
/**
* Auto-configuration for embedded LDAP.
*/
package org.springframework.boot.autoconfigure.ldap.embedded;
package org.springframework.boot.ldap.autoconfigure.embedded;

View File

@ -17,4 +17,4 @@
/**
* Auto-configuration for LDAP.
*/
package org.springframework.boot.autoconfigure.ldap;
package org.springframework.boot.ldap.autoconfigure;

View File

@ -0,0 +1,2 @@
org.springframework.boot.ldap.autoconfigure.LdapAutoConfiguration
org.springframework.boot.ldap.autoconfigure.embedded.EmbeddedLdapAutoConfiguration

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.ldap;
package org.springframework.boot.ldap.autoconfigure;
import javax.naming.Name;

View File

@ -14,11 +14,11 @@
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.ldap;
package org.springframework.boot.ldap.autoconfigure;
import org.junit.jupiter.api.Test;
import org.springframework.boot.autoconfigure.ldap.LdapProperties.Template;
import org.springframework.boot.ldap.autoconfigure.LdapProperties.Template;
import org.springframework.ldap.core.LdapTemplate;
import static org.assertj.core.api.Assertions.assertThat;

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.ldap.embedded;
package org.springframework.boot.ldap.autoconfigure.embedded;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
@ -31,7 +31,7 @@ import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration;
import org.springframework.boot.autoconfigure.ldap.LdapAutoConfiguration;
import org.springframework.boot.ldap.autoconfigure.LdapAutoConfiguration;
import org.springframework.boot.test.context.FilteredClassLoader;
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.boot.test.util.TestPropertyValues;

View File

@ -22,6 +22,7 @@ description = "Starter for using Spring Data LDAP"
dependencies {
api(project(":spring-boot-project:spring-boot-starters:spring-boot-starter"))
api(project(":spring-boot-project:spring-boot-ldap"))
api(project(":spring-boot-project:spring-boot-tx"))
api("org.springframework.data:spring-data-ldap")
}

View File

@ -63,6 +63,7 @@ dependencies {
optional(project(":spring-boot-project:spring-boot-jdbc"))
optional(project(":spring-boot-project:spring-boot-jooq"))
optional(project(":spring-boot-project:spring-boot-jsonb"))
optional(project(":spring-boot-project:spring-boot-ldap"))
optional(project(":spring-boot-project:spring-boot-liquibase")) {
exclude(group: "org.liquibase")
}

View File

@ -1,5 +1,5 @@
# AutoConfigureDataLdap auto-configuration imports
org.springframework.boot.autoconfigure.data.ldap.LdapRepositoriesAutoConfiguration
org.springframework.boot.autoconfigure.ldap.LdapAutoConfiguration
org.springframework.boot.autoconfigure.ldap.embedded.EmbeddedLdapAutoConfiguration
org.springframework.boot.ldap.autoconfigure.LdapAutoConfiguration
org.springframework.boot.ldap.autoconfigure.embedded.EmbeddedLdapAutoConfiguration
optional:org.springframework.boot.testcontainers.service.connection.ServiceConnectionAutoConfiguration

View File

@ -84,6 +84,7 @@ dependencies {
optional(project(":spring-boot-project:spring-boot-hazelcast"))
optional(project(":spring-boot-project:spring-boot-jdbc"))
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-neo4j"))
optional(project(":spring-boot-project:spring-boot-pulsar"))

View File

@ -25,7 +25,7 @@ import org.testcontainers.ldap.LLdapContainer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
import org.springframework.boot.autoconfigure.ldap.LdapAutoConfiguration;
import org.springframework.boot.ldap.autoconfigure.LdapAutoConfiguration;
import org.springframework.boot.testcontainers.service.connection.ServiceConnection;
import org.springframework.boot.testsupport.container.TestImage;
import org.springframework.context.annotation.Configuration;

View File

@ -24,7 +24,7 @@ import org.testcontainers.junit.jupiter.Testcontainers;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
import org.springframework.boot.autoconfigure.ldap.LdapAutoConfiguration;
import org.springframework.boot.ldap.autoconfigure.LdapAutoConfiguration;
import org.springframework.boot.testcontainers.service.connection.ServiceConnection;
import org.springframework.boot.testsupport.container.OpenLdapContainer;
import org.springframework.boot.testsupport.container.TestImage;

View File

@ -18,7 +18,7 @@ package org.springframework.boot.testcontainers.service.connection.ldap;
import org.testcontainers.ldap.LLdapContainer;
import org.springframework.boot.autoconfigure.ldap.LdapConnectionDetails;
import org.springframework.boot.ldap.autoconfigure.LdapConnectionDetails;
import org.springframework.boot.testcontainers.service.connection.ContainerConnectionDetailsFactory;
import org.springframework.boot.testcontainers.service.connection.ContainerConnectionSource;
import org.springframework.boot.testcontainers.service.connection.ServiceConnection;

View File

@ -23,7 +23,7 @@ import java.util.stream.Collectors;
import org.testcontainers.containers.Container;
import org.testcontainers.containers.GenericContainer;
import org.springframework.boot.autoconfigure.ldap.LdapConnectionDetails;
import org.springframework.boot.ldap.autoconfigure.LdapConnectionDetails;
import org.springframework.boot.testcontainers.service.connection.ContainerConnectionDetailsFactory;
import org.springframework.boot.testcontainers.service.connection.ContainerConnectionSource;
import org.springframework.boot.testcontainers.service.connection.ServiceConnection;