|
|
@@ -1,6 +1,7 @@
|
|
|
package com.usoftchina.uas.office.service;
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
+import com.usoftchina.uas.office.entity.DataCenter;
|
|
|
import com.usoftchina.uas.office.event.DataCenterEvent;
|
|
|
import com.usoftchina.uas.office.event.MasterEvent;
|
|
|
import com.usoftchina.uas.office.jdbc.DataSourceBean;
|
|
|
@@ -57,6 +58,9 @@ public class SchemaService extends AbstractService {
|
|
|
@Async
|
|
|
@EventListener(MasterEvent.class)
|
|
|
public void onMasterEvent(MasterEvent event) throws Exception {
|
|
|
- refreshSchema(event.getMaster());
|
|
|
+ if (!event.getMaster().username().equalsIgnoreCase(DataCenter.INSTANCE.username())
|
|
|
+ && !event.getMaster().url().equalsIgnoreCase(DataCenter.INSTANCE.url())) {
|
|
|
+ refreshSchema(event.getMaster());
|
|
|
+ }
|
|
|
}
|
|
|
}
|