配置文件未设置server.port时,DiscoveryConfiguration默认选择8080端口

pull/105/head
voilaf 3 years ago
parent d272589a11
commit 37e871050b

@ -39,7 +39,7 @@ public class DiscoveryConfiguration {
public InstanceInfo instanceConfig() { public InstanceInfo instanceConfig() {
String namespace = properties.getNamespace(); String namespace = properties.getNamespace();
String itemId = properties.getItemId(); String itemId = properties.getItemId();
String port = environment.getProperty("server.port"); String port = environment.getProperty("server.port", "8080");
String applicationName = environment.getProperty("spring.dynamic.thread-pool.item-id"); String applicationName = environment.getProperty("spring.dynamic.thread-pool.item-id");
String active = environment.getProperty("spring.profiles.active", "UNKNOWN"); String active = environment.getProperty("spring.profiles.active", "UNKNOWN");

Loading…
Cancel
Save