Commit fafa773c by Nepxion

重构测试类

parent 78eb1315
......@@ -15,7 +15,7 @@ import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import com.nepxion.discovery.plugin.example.adapter.DiscoveryConfigAdapter;
import com.nepxion.discovery.plugin.example.adapter.MyConfigAdapter;
import com.nepxion.discovery.plugin.example.extension.MyDiscoveryListener;
import com.nepxion.discovery.plugin.example.extension.MyRegisterListener;
import com.nepxion.discovery.plugin.example.extension.MySubscriber;
......@@ -31,8 +31,8 @@ public class DiscoveryApplicationA1 {
}
@Bean
public DiscoveryConfigAdapter discoveryConfigAdapter() {
return new DiscoveryConfigAdapter();
public MyConfigAdapter myConfigAdapter() {
return new MyConfigAdapter();
}
@Bean
......
......@@ -19,7 +19,7 @@ import com.nepxion.discovery.plugin.configcenter.ConfigAdapter;
// 模拟主动从本地或远程配置中心获取规则
// 模拟订阅远程配置中心的规则更新
public class DiscoveryConfigAdapter extends ConfigAdapter {
public class MyConfigAdapter extends ConfigAdapter {
// 从本地获取规则
// 通过application.properties里的spring.application.discovery.remote.config.enabled=true,来决定主动从本地,还是远程配置中心获取规则
@Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment