|
|
|
|
@ -20,6 +20,7 @@ package com.tencent.cloud.plugin.unit.config;
|
|
|
|
|
import javax.annotation.PostConstruct;
|
|
|
|
|
|
|
|
|
|
import com.tencent.cloud.common.tsf.ConditionalOnOnlyTsfConsulEnabled;
|
|
|
|
|
import com.tencent.cloud.plugin.unit.plugin.UnitScgEnhancedPlugin;
|
|
|
|
|
import com.tencent.tsf.unit.core.GatewayUnitArchCallback;
|
|
|
|
|
import com.tencent.tsf.unit.core.TencentUnitManager;
|
|
|
|
|
import com.tencent.tsf.unit.core.TsfZoneFilterUnitCallback;
|
|
|
|
|
@ -27,6 +28,7 @@ import com.tencent.tsf.unit.core.remote.TsfUnitConsulManager;
|
|
|
|
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
|
|
|
|
import org.springframework.context.annotation.Bean;
|
|
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -45,6 +47,11 @@ public class GatewayUnitAutoConfiguration {
|
|
|
|
|
private String applicationName;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Bean
|
|
|
|
|
public UnitScgEnhancedPlugin unitScgEnhancedPlugin() {
|
|
|
|
|
return new UnitScgEnhancedPlugin();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@PostConstruct
|
|
|
|
|
public void init() {
|
|
|
|
|
TencentUnitManager.addArchCallback(new GatewayUnitArchCallback(applicationName));
|
|
|
|
|
|