dependency
<dependency>
<groupId>com.github.gavlyukovskiy</groupId>
<artifactId>datasource-proxy-spring-boot-starter</artifactId>
<version>1.5.8</version>
</dependency>
logging.level.net.ttddyy.dsproxy.listener=debug
Caused by: org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'dataSource' is expected to be of type 'DynamicTenantAwareRoutingSource' but was actually of type 'com.github.gavlyukovskiy.boot.jdbc.decorator.DecoratedDataSource'
When I used DataSource
interface instead of DynamicTenantAwareRoutingSource
implementation of DataSource
interface it worked well.