Commit 219d4a44 authored by 黎博's avatar 黎博

fix bug

parent b81dbdbf
......@@ -31,13 +31,13 @@ public class SwitchDataSource {
/**
* pre 环境
*/
if (namespace.equals("pre")) {
if (namespace.equals("ka1")) {
DruidDataSource druidDataSource = new DruidDataSource();
String url = Namespace.PRE.getUrl() + database + SUFFIX;
String dbKey = Namespace.PRE.getKey();
String url = Namespace.KA1.getUrl() + database + SUFFIX;
String dbKey = Namespace.KA1.getKey();
druidDataSource.setUrl(url);
druidDataSource.setUsername(Namespace.PRE.getUsername());
druidDataSource.setPassword(Namespace.PRE.getPassword());
druidDataSource.setUsername(Namespace.KA1.getUsername());
druidDataSource.setPassword(Namespace.KA1.getPassword());
DynamicDataSource.dataSourcesMap.put(dbKey, druidDataSource);
DynamicDataSource.setDataSource(dbKey);
}
......
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