Closed omarchenko4j closed 1 year ago
why do you have spring.config.import
and bootstrap? Only one is required.
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.
When the property
spring.cloud.consul.config.watch.enabled
istrue
an exceptionUnsatisfiedDependencyException
is thrown inConsulRefreshConfiguration
when creating a beanConfigWatch
because 2 candidate beans with typeConsulConfigIndexes
are found:consulPropertySourceLocator
configDataConsulConfigIndexes
This happens because the
ConsulPropertySourceLocator
class implements theConsulConfigIndexes
interface as well asConsulConfigDataIndexes
, which is registered as a bean dynamically in theConsulConfigDataLocationResolver:resolveProfileSpecific()
.Reproduced in this test project on Spring-Cloud version 2020.0.4 with spring-cloud-starter-consul-config version 3.0.4.