Commit 4f31596e by Spencer Gibb

Fallback to server.port if management.port not set.

See gh-896
parent a1857556
...@@ -61,14 +61,14 @@ public class SidecarConfiguration { ...@@ -61,14 +61,14 @@ public class SidecarConfiguration {
@Autowired @Autowired
private InetUtils inetUtils; private InetUtils inetUtils;
@Value("${management.port:${MANAGEMENT_PORT:${PORT:8080}}}") @Value("${management.port:${MANAGEMENT_PORT:${server.port:${SERVER_PORT:${PORT:8080}}}}}")
private int managementPort = 8080; private int managementPort = 8080;
@Value("${eureka.instance.hostname:${EUREKA_INSTANCE_HOSTNAME:}}") @Value("${eureka.instance.hostname:${EUREKA_INSTANCE_HOSTNAME:}}")
String hostname; private String hostname;
@Autowired @Autowired
ConfigurableEnvironment env; private ConfigurableEnvironment env;
@Bean @Bean
public EurekaInstanceConfigBean eurekaInstanceConfigBean() { public EurekaInstanceConfigBean eurekaInstanceConfigBean() {
......
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