first commit
This commit is contained in:
@ -36,7 +36,7 @@ public class DatasourceConnectionMonitor {
|
||||
@Resource
|
||||
private DynamicDatasourceService dynamicDatasourceService;
|
||||
|
||||
//@PostConstruct
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
new Timer().schedule(new TimerTask() {
|
||||
@Override
|
||||
@ -60,6 +60,7 @@ public class DatasourceConnectionMonitor {
|
||||
if (check(connection)) {
|
||||
// 说明数据源正常
|
||||
log.debug("租户[{}]-目前主数据源正常, 无需切换数据源", tenantId);
|
||||
connection.close();
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user