Работают ли Spring LDAP и Spring Cloud Consul вместе? - PullRequest
0 голосов
/ 07 декабря 2018

У меня был проект с Spring LDAP на месте.Я пытаюсь внедрить Spring Consul в этот проект и столкнулся с проблемами, связанными с ним.

Вот pom.xml:

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.0.2.RELEASE</version>
    <relativePath/> <!-- lookup parent from repository -->
</parent>
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-consul-all</artifactId>
    <version>2.0.0.RELEASE</version>
</dependency>

Вот свойства приложения:

#consul properties
spring.cloud.consul.config.format=PROPERTIES
spring.cloud.consul.discovery.healthCheckPath=/<root>/health
spring.cloud.consul.discovery.healthCheckInterval=15s
spring.application.name=<App_Name>
spring.profiles.active=dev

И я включил клиент обнаружения с помощью @EnableDiscoveryClient в классе SpringBootApplication.

Но я заканчиваю с этой ошибкой, и приложение никогда не запускается:

***************************
APPLICATION FAILED TO START
***************************

Description:

Field ldapTemplate in com.<package>.config.LdapClient required a bean of type 'org.springframework.ldap.core.LdapTemplate' that could not be found.
    - Bean method 'ldapTemplate' not loaded because @ConditionalOnClass did not find required class 'org.springframework.data.ldap.repository.LdapRepository'


Action:

Consider revisiting the conditions above or defining a bean of type 'org.springframework.ldap.core.LdapTemplate' in your configuration.

Disconnected from the target VM, address: '127.0.0.1:62703', transport: 'socket'

IЯ полагаю, что это как-то связано с автоматическим обнаружением Ldap, и введение Consul вызывает эту проблему, но я не могу точно определить проблему.

Может кто-нибудь помочь мне решить эту проблему?

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...