通讯组件初始化错误处理

V0.5.x
xiwa 2022-04-02 10:30:08 +08:00
parent 983e857275
commit 1c61923d0e
1 changed files with 8 additions and 4 deletions

View File

@ -49,10 +49,14 @@ public class ComponentManager {
@PostConstruct
public void init() {
List<ProtocolComponent> componentList = componentRepository.findByState(ProtocolComponent.STATE_RUNNING);
for (ProtocolComponent component : componentList) {
register(component);
start(component.getId());
try {
List<ProtocolComponent> componentList = componentRepository.findByState(ProtocolComponent.STATE_RUNNING);
for (ProtocolComponent component : componentList) {
register(component);
start(component.getId());
}
} catch (Throwable e) {
log.error("init protocol components error", e);
}
}