DataSourceNameResolver does not work as expected
Closed this issue · 0 comments
janput commented
When using multiple datasource they all get the same name "dataSource".
You cannot get the bean name from applicationContext.getBeansOfType(DataSource.class)
because they haven't finished initializing. So the returned map will never contain the bean you are decorating. You should pass the bean name via a parameter in the resolveDataSourceName
method.