-
-
Notifications
You must be signed in to change notification settings - Fork 95
Closed
Labels
Description
I have a library that need an optional dependency with spring-cloud-sleuth and another dependency with datasource-proxy-spring-boot-starter for some datasources customizations. This work for me until I updated to sleuth 3.1.0-RC1. I get a bean name collision between classes defined in:
- org.springframework.cloud.sleuth.autoconfig.instrument.jdbc.DataSourceProxyConfiguration
- com.github.gavlyukovskiy.boot.jdbc.decorator.dsproxy.DataSourceProxyConfiguration
Caused by: org.springframework.beans.factory.support.BeanDefinitionOverrideException: Invalid bean definition with name 'proxyDataSourceBuilderConfigurer' defined in class path resource [org/springframework/cloud/sleuth/autoconfig/instrument/jdbc/DataSourceProxyConfiguration.class]: Cannot register bean definition [Root bean: class [null]; scope=; abstract=false; lazyInit=null; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.cloud.sleuth.autoconfig.instrument.jdbc.DataSourceProxyConfiguration; factoryMethodName=proxyDataSourceBuilderConfigurer; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/cloud/sleuth/autoconfig/instrument/jdbc/DataSourceProxyConfiguration.class]] for bean 'proxyDataSourceBuilderConfigurer': There is already [Root bean: class [null]; scope=; abstract=false; lazyInit=null; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=com.github.gavlyukovskiy.boot.jdbc.decorator.dsproxy.DataSourceProxyConfiguration; factoryMethodName=proxyDataSourceBuilderConfigurer; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [com/github/gavlyukovskiy/boot/jdbc/decorator/dsproxy/DataSourceProxyConfiguration.class]] bound.
There is a plan to avoid this name collision to allow that both artifacts can be used in the same application?
david-kerwick