mirror of
https://gitee.com/mirrors/Spring-Cloud-Alibaba.git
synced 2021-06-26 13:25:11 +08:00
remote set port action
This commit is contained in:
parent
eaf93fdc3f
commit
328a473da2
@ -16,6 +16,11 @@
|
|||||||
|
|
||||||
package org.springframework.cloud.alicloud.ans.registry;
|
package org.springframework.cloud.alicloud.ans.registry;
|
||||||
|
|
||||||
|
import java.net.URI;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import javax.annotation.PostConstruct;
|
||||||
|
|
||||||
import org.springframework.cloud.alicloud.context.ans.AnsProperties;
|
import org.springframework.cloud.alicloud.context.ans.AnsProperties;
|
||||||
import org.springframework.cloud.client.DefaultServiceInstance;
|
import org.springframework.cloud.client.DefaultServiceInstance;
|
||||||
import org.springframework.cloud.client.ServiceInstance;
|
import org.springframework.cloud.client.ServiceInstance;
|
||||||
@ -25,10 +30,6 @@ import org.springframework.context.ApplicationContext;
|
|||||||
import org.springframework.core.env.Environment;
|
import org.springframework.core.env.Environment;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
import javax.annotation.PostConstruct;
|
|
||||||
import java.net.URI;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author xiaolongzuo
|
* @author xiaolongzuo
|
||||||
*/
|
*/
|
||||||
@ -64,11 +65,6 @@ public class AnsRegistration implements Registration, ServiceInstance {
|
|||||||
metadata.put(MANAGEMENT_ADDRESS, address);
|
metadata.put(MANAGEMENT_ADDRESS, address);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String serverPort = env.getProperty("server.port");
|
|
||||||
if (null != serverPort) {
|
|
||||||
this.setPort(Integer.valueOf(serverPort));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user