|
@@ -61,6 +61,8 @@ public class DynamicDataSourceHandler extends HandlerInterceptorAdapter {
|
|
String dbNameDefault = SpringHelper.getString("spring.application.name");
|
|
String dbNameDefault = SpringHelper.getString("spring.application.name");
|
|
// 创建的数据源名称: 集团编码_应用名
|
|
// 创建的数据源名称: 集团编码_应用名
|
|
String newDsName = AppContext.getContext().getGroupCode() + "_" + dbNameDefault;
|
|
String newDsName = AppContext.getContext().getGroupCode() + "_" + dbNameDefault;
|
|
|
|
+ // 大小写处理:全部小写
|
|
|
|
+ newDsName = newDsName.toLowerCase();
|
|
// 数据源中是否已存在
|
|
// 数据源中是否已存在
|
|
if(!dataSource.getCurrentDataSources().keySet().contains(newDsName)) {
|
|
if(!dataSource.getCurrentDataSources().keySet().contains(newDsName)) {
|
|
// 设置新数据源
|
|
// 设置新数据源
|