mirror of
https://gitee.com/dromara/dbswitch.git
synced 2025-09-23 12:44:15 +00:00
修复postgresql同步报错问题
This commit is contained in:
@@ -179,7 +179,9 @@ public final class DataSourceUtils {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}).toArray(URL[]::new);
|
||||
URLClassLoader loader = new URLClassLoader(urls, null);
|
||||
ClassLoader parent = driverClass.contains("postgresql")
|
||||
? Thread.currentThread().getContextClassLoader() : null;
|
||||
URLClassLoader loader = new URLClassLoader(urls, parent);
|
||||
try {
|
||||
Class<?> clazz = loader.loadClass(driverClass);
|
||||
clazz.newInstance();
|
||||
|
@@ -5,7 +5,7 @@ dbswitch:
|
||||
## support multiple source database connection
|
||||
- url: jdbc:mysql://172.17.2.10:3306/test?useUnicode=true&characterEncoding=utf-8&useSSL=false&zeroDateTimeBehavior=convertToNull&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&tinyInt1isBit=false&rewriteBatchedStatements=true&useCompression=true
|
||||
driver-class-name: 'com.mysql.jdbc.Driver'
|
||||
driver-path: D:/Workspace/dbswitch/drivers/mysql/mysql-5.7
|
||||
driver-path: D:/Workspace/dbswitch/drivers/mysql/mysql-5
|
||||
username: 'test'
|
||||
password: '123456'
|
||||
# source database configuration parameters
|
||||
@@ -31,7 +31,7 @@ dbswitch:
|
||||
## Best support for Oracle/PostgreSQL/Greenplum/DM etc.
|
||||
url: jdbc:postgresql://172.17.2.10:5432/test
|
||||
driver-class-name: org.postgresql.Driver
|
||||
driver-path: D:/Workspace/dbswitch/driver/postgresql/postgresql-11.4
|
||||
driver-path: D:/Workspace/dbswitch/drivers/postgresql/postgresql-11.4
|
||||
username: 'test'
|
||||
password: '123456'
|
||||
# target database configuration parameters
|
||||
|
Reference in New Issue
Block a user