Commit 0608f987 by Dave Syer

Ensure server port is 8080 by default

parent e42328fa
...@@ -36,10 +36,12 @@ import com.netflix.discovery.EurekaClientConfig; ...@@ -36,10 +36,12 @@ import com.netflix.discovery.EurekaClientConfig;
* *
*/ */
@Configuration @Configuration
@EnableConfigurationProperties({EurekaClientConfigBean.class, EurekaInstanceConfigBean.class}) @EnableConfigurationProperties({ EurekaClientConfigBean.class,
EurekaInstanceConfigBean.class })
@ConditionalOnClass(EurekaClientConfig.class) @ConditionalOnClass(EurekaClientConfig.class)
@ConditionalOnExpression("${eureka.client.enabled:true}") @ConditionalOnExpression("${eureka.client.enabled:true}")
public class EurekaClientAutoConfiguration implements ApplicationListener<ContextRefreshedEvent> { public class EurekaClientAutoConfiguration implements
ApplicationListener<ContextRefreshedEvent> {
@Autowired @Autowired
private EurekaClientConfigBean clientConfig; private EurekaClientConfigBean clientConfig;
...@@ -54,9 +56,7 @@ public class EurekaClientAutoConfiguration implements ApplicationListener<Contex ...@@ -54,9 +56,7 @@ public class EurekaClientAutoConfiguration implements ApplicationListener<Contex
@PostConstruct @PostConstruct
public void init() { public void init() {
DiscoveryManager.getInstance().initComponent( DiscoveryManager.getInstance().initComponent(instanceConfig, clientConfig);
instanceConfig,
clientConfig);
} }
@PreDestroy @PreDestroy
......
...@@ -53,7 +53,7 @@ public class EurekaInstanceConfigBean implements EurekaInstanceConfig { ...@@ -53,7 +53,7 @@ public class EurekaInstanceConfigBean implements EurekaInstanceConfig {
private boolean instanceEnabledOnit; private boolean instanceEnabledOnit;
@Value("${server.port:80}") @Value("${server.port:${SERVER_PORT:${PORT:8080}}}")
private int nonSecurePort = 80; private int nonSecurePort = 80;
private int securePort = 443; private int securePort = 443;
......
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