This commit is contained in:
2023-06-06 17:52:07 +08:00
parent bd2c01fe40
commit 7f9c2a64c1
12 changed files with 383 additions and 243 deletions

View File

@ -21,7 +21,7 @@ public class DynamicDataSource {
/**
* 租户Code
*/
private String tenantCode;
private String tenantId;
/**
* 数据库-url

View File

@ -45,4 +45,16 @@ public class JdbcUtil {
}
}
}
public static Connection getConnection(String driver, String url, String username, String password) {
Connection conn = null;
try {
Class.forName(driver);
//建立连接
conn = DriverManager.getConnection(url, username, password);
} catch (Exception e) {
e.printStackTrace();
}
return conn;
}
}