Commit 3a78e3e5 authored by 黎博's avatar 黎博

新增获取数据库列表接口

parent dbeedd9b
...@@ -107,7 +107,7 @@ public class DbSyncController { ...@@ -107,7 +107,7 @@ public class DbSyncController {
} }
/** /**
* 数据库同步脚本使用的接口 * 数据库同步脚本使用的接口
* @param database 数据库名 * @param database 数据库名
* @return * @return
*/ */
...@@ -117,6 +117,17 @@ public class DbSyncController { ...@@ -117,6 +117,17 @@ public class DbSyncController {
return StringUtils.join(tableList, " "); return StringUtils.join(tableList, " ");
} }
/**
* 获取同步库所有的数据库
* 给数据库同步脚本使用的接口
* @return
*/
@GetMapping("/dbList")
public String getDbListForSync() {
List<String> dbList = databaseSyncService.getDatabaseList(ip, port, username, password);
return StringUtils.join(dbList, " ");
}
/** /**
* 同步表结构 * 同步表结构
* @param targetIp * @param targetIp
......
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