Class LdaptiveAutoConfiguration


  • @Configuration
    @ConditionalOnClass({org.ldaptive.ConnectionFactory.class,org.bremersee.data.ldaptive.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 Detail

      • LdaptiveAutoConfiguration

        public LdaptiveAutoConfiguration​(LdaptiveProperties ldaptiveProperties,
                                         org.springframework.beans.factory.ObjectProvider<LdaptiveConnectionConfigFactory> connectionConfigFactory)
        Instantiates a new ldaptive configuration.
        Parameters:
        ldaptiveProperties - the ldaptive properties
        connectionConfigFactory - the connection config factory
    • Method Detail

      • init

        @EventListener(org.springframework.boot.context.event.ApplicationReadyEvent.class)
        public void init()
        Init.
      • ldaptiveTemplate

        @ConditionalOnMissingBean(org.bremersee.data.ldaptive.LdaptiveOperations.class)
        @Bean
        public org.bremersee.data.ldaptive.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(org.bremersee.data.ldaptive.reactive.ReactiveLdaptiveOperations.class)
        @Bean
        public org.bremersee.data.ldaptive.reactive.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