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.
This commit is contained in:
@@ -75,7 +75,7 @@ public class EurekaClientAutoConfiguration {
|
||||
@Value("${server.port:${SERVER_PORT:${PORT:8080}}}")
|
||||
int nonSecurePort;
|
||||
|
||||
@Value("${management.port:${MANAGEMENT_PORT:${PORT:8080}}}")
|
||||
@Value("${management.port:${MANAGEMENT_PORT:${server.port:${SERVER_PORT:${PORT:8080}}}}}")
|
||||
int managementPort;
|
||||
|
||||
@Value("${eureka.instance.hostname:${EUREKA_INSTANCE_HOSTNAME:}}")
|
||||
|
||||
Reference in New Issue
Block a user