modify
This commit is contained in:
+5
-1
@@ -9,6 +9,7 @@ import org.apache.commons.lang.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.cloud.context.config.annotation.RefreshScope;
|
||||
import org.springframework.cloud.context.refresh.ContextRefresher;
|
||||
import org.springframework.core.env.Environment;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@@ -33,8 +34,10 @@ public class CanalAdapterService {
|
||||
private CanalAdapterLoader adapterLoader;
|
||||
|
||||
@Resource
|
||||
private AdapterCanalConfig adapterCanalConfig;
|
||||
private ContextRefresher contextRefresher;
|
||||
|
||||
@Resource
|
||||
private AdapterCanalConfig adapterCanalConfig;
|
||||
@Resource
|
||||
private Environment env;
|
||||
|
||||
@@ -62,6 +65,7 @@ public class CanalAdapterService {
|
||||
configMonitor = new AdapterRemoteConfigMonitor(jdbcUrl, jdbcUsername, jdbcPassword);
|
||||
configMonitor.loadRemoteConfig();
|
||||
configMonitor.loadRemoteAdapterConfigs();
|
||||
contextRefresher.refresh();
|
||||
configMonitor.start();
|
||||
}
|
||||
|
||||
|
||||
@@ -12,10 +12,10 @@ spring:
|
||||
time-zone: GMT+8
|
||||
default-property-inclusion: non_null
|
||||
|
||||
canal.manager.jdbc:
|
||||
url: jdbc:mysql://127.0.0.1:3306/canal_manager?useUnicode=true&characterEncoding=UTF-8
|
||||
username: root
|
||||
password: 121212
|
||||
#canal.manager.jdbc:
|
||||
# url: jdbc:mysql://127.0.0.1:3306/canal_manager?useUnicode=true&characterEncoding=UTF-8
|
||||
# username: root
|
||||
# password: 121212
|
||||
|
||||
canal:conf:
|
||||
canalServerHost: 127.0.0.1:11111
|
||||
|
||||
Reference in New Issue
Block a user