This is a question regarding workflows-service-distribution 8.0.9. The issue is probably there since 8.0.7.
In our setup, spring has an issue creating the bean based on the new properties class WorkflowsProperties. There seems to be some ambiguity regarding resolution of the parameter(s). Here the conflict is with spring-cloud-sleuth, but I suppose this could happen with any other List<String> - bean available in the spring context.
Here is the error:
... Error creating bean with name 'mgmtp.a12.workflows-com.mgmtp.a12.workflows.service.config.WorkflowsProperties': Unsatisfied dependency
expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException:
No qualifying bean of type 'java.util.List<java.lang.String>' available: expected single matching bean but found 4:
spring.sleuth.baggage-keys,spring.sleuth.local-keys,spring.sleuth.propagation-keys,spring.sleuth.log.slf4j.whitelisted-mdc-keys
I tried a couple of things (fiddling with @EnableConfigurationProperties, @Import etc), but noticed that other ConfigurationProperties (e.g. Configuration#DataServicesProperties) are working just fine.
I ended up creating my own WorkflowsProperties, adding @ConstructorBinding and a default value for skipPartialValidationForModels:
package com.mgmtp.a12.workflows.service.config
import org.springframework.boot.context.properties.ConfigurationProperties
import org.springframework.boot.context.properties.ConstructorBinding
import org.springframework.context.annotation.Primary
@ConstructorBinding
@ConfigurationProperties("mgmtp.a12.workflows")
@Primary
data class WorkflowsProperties(
val skipPartialValidationForModels: List<String> = emptyList()
)
Of course I strongly dislike this kind of monkey-patching and would be happy to hear about alternative solutions.
Thanks.