mirror of https://gitee.com/stylefeng/roses
【7.2.5】修改判断数据库类型,改为和枚举名称一致
parent
955361b686
commit
f564c53c95
|
@ -67,18 +67,16 @@ public enum DbTypeEnum {
|
||||||
*/
|
*/
|
||||||
public static String getTypeByUrl(String url) {
|
public static String getTypeByUrl(String url) {
|
||||||
if (url == null) {
|
if (url == null) {
|
||||||
return MYSQL.getUrlWords();
|
return MYSQL.name();
|
||||||
}
|
}
|
||||||
if (url.contains(DbTypeEnum.ORACLE.getUrlWords())) {
|
|
||||||
return ORACLE.getUrlWords();
|
for (DbTypeEnum value : DbTypeEnum.values()) {
|
||||||
} else if (url.contains(DbTypeEnum.DM.getUrlWords())) {
|
if (url.contains(value.getUrlWords())) {
|
||||||
return DM.getUrlWords();
|
return value.name();
|
||||||
} else if (url.contains(DbTypeEnum.MS_SQL.getUrlWords())) {
|
|
||||||
return MS_SQL.getUrlWords();
|
|
||||||
} else if (url.contains(DbTypeEnum.PG_SQL.getUrlWords())) {
|
|
||||||
return PG_SQL.getUrlWords();
|
|
||||||
}
|
}
|
||||||
return MYSQL.getUrlWords();
|
}
|
||||||
|
|
||||||
|
return MYSQL.name();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue