Commit 38a83471 authored by 黎博's avatar 黎博

修改配置

parent ecbcce34
...@@ -16,7 +16,7 @@ public class SwitchDataSource { ...@@ -16,7 +16,7 @@ public class SwitchDataSource {
public static void dataSourceSwitch(String namespace, String database) { public static void dataSourceSwitch(String namespace, String database) {
/** /**
* PRE 环境 * pre 环境
*/ */
if (namespace.equals("pre")) { if (namespace.equals("pre")) {
DruidDataSource druidDataSource = new DruidDataSource(); DruidDataSource druidDataSource = new DruidDataSource();
...@@ -126,5 +126,19 @@ public class SwitchDataSource { ...@@ -126,5 +126,19 @@ public class SwitchDataSource {
DynamicDataSource.dataSourcesMap.put(dbKey, druidDataSource); DynamicDataSource.dataSourcesMap.put(dbKey, druidDataSource);
DynamicDataSource.setDataSource(dbKey); DynamicDataSource.setDataSource(dbKey);
} }
/**
* vcc环境
*/
if (namespace.equals("vcc")) {
DruidDataSource druidDataSource = new DruidDataSource();
String url = Namespace.VCC.getUrl() + database + SUFFIX;
String dbKey = Namespace.VCC.getKey();
druidDataSource.setUrl(url);
druidDataSource.setUsername(Namespace.VCC.getUsername());
druidDataSource.setPassword(Namespace.VCC.getPassword());
DynamicDataSource.dataSourcesMap.put(dbKey, druidDataSource);
DynamicDataSource.setDataSource(dbKey);
}
} }
} }
...@@ -41,6 +41,6 @@ pagehelper: ...@@ -41,6 +41,6 @@ pagehelper:
logging: logging:
level: level:
root: info root: info
cn.qg.qaplatform: debug cn.qg.qaplatform: info
file: file:
name: /home/quant_group/logs/qa-platform.log name: /home/quant_group/logs/qa-platform.log
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment