mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-09 04:49:02 +08:00
⬆️ Upgrading dependencies. 更新 spring boot 、spring cloud 、mp 、pay 依赖
⬆️ Upgrading dependencies. 更新 spring boot 、spring cloud 、mp 、pay 依赖
This commit is contained in:
1 parent
ec3bbd900e
commit
cf0db9c132
44 files changed
+109
-113
No files matched your search
+2
-2
@@ -117,14 +117,14 @@ public class GenDatasourceConfServiceImpl extends ServiceImpl<GenDatasourceConfM
|
||||
@Override
|
||||
public void addDynamicDataSource(GenDatasourceConf conf) {
|
||||
DataSourceProperty dataSourceProperty = new DataSourceProperty();
|
||||
dataSourceProperty.setPollName(conf.getName());
|
||||
dataSourceProperty.setPoolName(conf.getName());
|
||||
dataSourceProperty.setUrl(conf.getUrl());
|
||||
dataSourceProperty.setUsername(conf.getUsername());
|
||||
dataSourceProperty.setPassword(conf.getPassword());
|
||||
DataSource dataSource = dataSourceCreator.createDataSource(dataSourceProperty);
|
||||
|
||||
DynamicRoutingDataSource dynamicRoutingDataSource = SpringContextHolder.getBean(DynamicRoutingDataSource.class);
|
||||
dynamicRoutingDataSource.addDataSource(dataSourceProperty.getPollName(), dataSource);
|
||||
dynamicRoutingDataSource.addDataSource(dataSourceProperty.getPoolName(), dataSource);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user