Commit 0608f987 by Dave Syer

Ensure server port is 8080 by default

parent e42328fa
......@@ -36,29 +36,29 @@ import com.netflix.discovery.EurekaClientConfig;
*
*/
@Configuration
@EnableConfigurationProperties({EurekaClientConfigBean.class, EurekaInstanceConfigBean.class})
@EnableConfigurationProperties({ EurekaClientConfigBean.class,
EurekaInstanceConfigBean.class })
@ConditionalOnClass(EurekaClientConfig.class)
@ConditionalOnExpression("${eureka.client.enabled:true}")
public class EurekaClientAutoConfiguration implements ApplicationListener<ContextRefreshedEvent> {
public class EurekaClientAutoConfiguration implements
ApplicationListener<ContextRefreshedEvent> {
@Autowired
private EurekaClientConfigBean clientConfig;
@Autowired
private EurekaInstanceConfigBean instanceConfig;
@Override
public void onApplicationEvent(ContextRefreshedEvent event) {
ApplicationInfoManager.getInstance().setInstanceStatus(InstanceStatus.UP);
ApplicationInfoManager.getInstance().setInstanceStatus(InstanceStatus.UP);
}
@PostConstruct
public void init() {
DiscoveryManager.getInstance().initComponent(
instanceConfig,
clientConfig);
DiscoveryManager.getInstance().initComponent(instanceConfig, clientConfig);
}
@PreDestroy
public void close() {
DiscoveryManager.getInstance().shutdownComponent();
......
......@@ -53,7 +53,7 @@ public class EurekaInstanceConfigBean implements EurekaInstanceConfig {
private boolean instanceEnabledOnit;
@Value("${server.port:80}")
@Value("${server.port:${SERVER_PORT:${PORT:8080}}}")
private int nonSecurePort = 80;
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