Package org.bremersee.data.ldaptive
Class LdaptiveAutoConfiguration
- java.lang.Object
-
- org.bremersee.data.ldaptive.LdaptiveAutoConfiguration
-
@Configuration @ConditionalOnClass({org.ldaptive.ConnectionFactory.class,LdaptiveTemplate.class}) @ConditionalOnProperty(prefix="bremersee.ldaptive", name="enabled", havingValue="true") @EnableConfigurationProperties(LdaptiveProperties.class) public class LdaptiveAutoConfiguration extends Object
The ldaptive configuration.- Author:
- Christian Bremer
-
-
Constructor Summary
Constructors Constructor Description LdaptiveAutoConfiguration(LdaptiveProperties ldaptiveProperties, org.springframework.beans.factory.ObjectProvider<LdaptiveConnectionConfigFactory> connectionConfigFactory)
Instantiates a new ldaptive configuration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.ldaptive.ConnectionFactory
connectionFactory()
Builds connection factory bean.void
init()
Init.LdaptiveTemplate
ldaptiveTemplate(org.ldaptive.ConnectionFactory connectionFactory)
Builds ldaptive template.ReactiveLdaptiveTemplate
reactiveLdaptiveTemplate(org.ldaptive.ConnectionFactory connectionFactory)
Builds reactive ldaptive template.
-
-
-
Constructor Detail
-
LdaptiveAutoConfiguration
public LdaptiveAutoConfiguration(LdaptiveProperties ldaptiveProperties, org.springframework.beans.factory.ObjectProvider<LdaptiveConnectionConfigFactory> connectionConfigFactory)
Instantiates a new ldaptive configuration.- Parameters:
ldaptiveProperties
- the ldaptive propertiesconnectionConfigFactory
- the connection config factory
-
-
Method Detail
-
init
@EventListener(org.springframework.boot.context.event.ApplicationReadyEvent.class) public void init()
Init.
-
ldaptiveTemplate
@ConditionalOnMissingBean(LdaptiveOperations.class) @Bean public LdaptiveTemplate ldaptiveTemplate(org.ldaptive.ConnectionFactory connectionFactory)
Builds ldaptive template.- Parameters:
connectionFactory
- the connection factory- Returns:
- the ldaptive template
-
reactiveLdaptiveTemplate
@ConditionalOnClass(name="reactor.core.publisher.Mono") @ConditionalOnMissingBean(ReactiveLdaptiveOperations.class) @Bean public ReactiveLdaptiveTemplate reactiveLdaptiveTemplate(org.ldaptive.ConnectionFactory connectionFactory)
Builds reactive ldaptive template.- Parameters:
connectionFactory
- the connection factory- Returns:
- the reactive ldaptive template
-
connectionFactory
@ConditionalOnMissingBean(org.ldaptive.ConnectionFactory.class) @Bean(destroyMethod="close") public org.ldaptive.ConnectionFactory connectionFactory()
Builds connection factory bean.- Returns:
- the connection factory bean
-
-