This commit is contained in:
zhou-hao
2017-11-30 01:55:58 +08:00
parent b9a4d15af3
commit 4e4d17390e
13 changed files with 51 additions and 54 deletions

View File

@@ -17,7 +17,7 @@ public class DynamicDataSourceProxy implements DynamicDataSource {
private String id;
private DatabaseType databaseType;
private volatile DatabaseType databaseType;
private DataSource proxy;

View File

@@ -1,5 +1,6 @@
package org.hswebframework.web.datasource.service;
import lombok.extern.slf4j.Slf4j;
import org.hswebframework.web.datasource.DynamicDataSource;
import org.hswebframework.web.datasource.exception.DataSourceClosedException;
@@ -10,6 +11,7 @@ import java.util.concurrent.CountDownLatch;
*
* @author zhouhao
*/
@Slf4j
public class DataSourceCache {
private long hash;
@@ -29,6 +31,7 @@ public class DataSourceCache {
//等待初始化完成
initLatch.await();
} catch (InterruptedException ignored) {
log.warn(ignored.getMessage(),ignored);
} finally {
initLatch = null;
}