Commit a6e47a0b by Dave Syer

Ensure management.port defaults to server.port for eureka registration

Otherwise apps register the wrong health and status URLs by default. If there is no explicit management.port we just need a default that is the same as server.port.
parent be0f030c
...@@ -75,7 +75,7 @@ public class EurekaClientAutoConfiguration { ...@@ -75,7 +75,7 @@ public class EurekaClientAutoConfiguration {
@Value("${server.port:${SERVER_PORT:${PORT:8080}}}") @Value("${server.port:${SERVER_PORT:${PORT:8080}}}")
int nonSecurePort; int nonSecurePort;
@Value("${management.port:${MANAGEMENT_PORT:${PORT:8080}}}") @Value("${management.port:${MANAGEMENT_PORT:${server.port:${SERVER_PORT:${PORT:8080}}}}}")
int managementPort; int managementPort;
@Value("${eureka.instance.hostname:${EUREKA_INSTANCE_HOSTNAME:}}") @Value("${eureka.instance.hostname:${EUREKA_INSTANCE_HOSTNAME:}}")
......
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