/** * 重写父类中的setTargetDataSources方法,在设置数据源属性之前,将配置中的数据源分类封装一下 * * @param targetDataSources */ public void setTargetDataSources(Map<Object, Object> targetDataSources) { if (MapUtils.isNotEmpty(targetDataSources)) { Iterator iterator = targetDataSources.keySet().iterator(); while (iterator.hasNext()) { String dataSourceName = (String) iterator.next(); if (!DEFAULT_DATE_SOURCE.equals(dataSourceName)) { slaverDataSorceNameList.add(dataSourceName); } } } super.setTargetDataSources(targetDataSources); }
@Override public void setDefaultTargetDataSource(Object defaultTargetDataSource) { super.setDefaultTargetDataSource(defaultTargetDataSource); }
@Override public void setTargetDataSources(Map targetDataSources) { super.setTargetDataSources(targetDataSources); }
@Override public void setDataSourceLookup(DataSourceLookup dataSourceLookup) { super.setDataSourceLookup(dataSourceLookup); }