Skip to content

Commit 87c6184

Browse files
committed
feat:ban eureka discovery.
Signed-off-by: Haotian Zhang <928016560@qq.com>
1 parent e7ba59a commit 87c6184

File tree

3 files changed

+4
-1
lines changed
  • polaris-agent-core/polaris-agent-core-bootstrap-common/src/main/java/cn/polarismesh/agent/core/bootstrap
  • polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-2021-examples/quickstart-examples/gateway/src/main/resources
  • polaris-agent-plugins/spring-cloud-plugins/spring-cloud-plugin-common/src/main/java/cn/polarismesh/agent/plugin/spring/cloud/common

3 files changed

+4
-1
lines changed

polaris-agent-core/polaris-agent-core-bootstrap-common/src/main/java/cn/polarismesh/agent/core/bootstrap/PolarisInitProperties.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,7 @@ public void initialize() {
2424
// ban nacos as sct currently does not support double registration
2525
System.setProperty("spring.cloud.nacos.discovery.enabled", "false");
2626

27+
// ban eureka as sct currently does not support double registration
28+
System.setProperty("eureka.client.enabled", "false");
2729
}
2830
}

polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-2021-examples/quickstart-examples/gateway/src/main/resources/application.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ spring:
1313
username: 'nacos'
1414
password: 'nacos'
1515
discovery:
16-
enabled: false
16+
enabled: true
1717
server-addr: 127.0.0.1:8848
1818
config:
1919
enabled: true

polaris-agent-plugins/spring-cloud-plugins/spring-cloud-plugin-common/src/main/java/cn/polarismesh/agent/plugin/spring/cloud/common/PropertiesProvider.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ public static List<PropertiesPropertySource> loadPropertiesSource() {
6868
throw new IllegalStateException("fail to load config from " + configPath, e);
6969
}
7070
properties.setProperty("spring.cloud.nacos.discovery.enabled", "false");
71+
properties.setProperty("eureka.client.enabled", "false");
7172
propertySources.add(new PropertiesPropertySource("__polaris_agent_spring_cloud_tencent__", properties));
7273
propertySources.add(new PropertiesPropertySource("__default_polaris_agent_spring_cloud_tencent__", defaultProperties));
7374
return propertySources;

0 commit comments

Comments
 (0)