|
|
@@ -13,6 +13,7 @@ import io.netty.channel.EventLoopGroup; |
|
|
|
import io.netty.channel.nio.NioEventLoopGroup; |
|
|
|
import io.netty.channel.socket.nio.NioServerSocketChannel; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.springframework.core.env.ConfigurableEnvironment; |
|
|
|
|
|
|
|
import java.net.InetSocketAddress; |
|
|
|
|
|
|
@@ -31,12 +32,12 @@ public class DipperPositionServer { |
|
|
|
private Integer posAsycPort; |
|
|
|
private Integer starsAsycPort; |
|
|
|
|
|
|
|
public DipperPositionServer(PositionConfigInfo pci) throws NacosException { |
|
|
|
public DipperPositionServer(ConfigurableEnvironment environment) throws NacosException { |
|
|
|
|
|
|
|
this.serverAddr = pci.getServerAddr(); |
|
|
|
this.timeAsycPort = Integer.parseInt(pci.getTimeAsycPort()); |
|
|
|
this.posAsycPort = Integer.parseInt(pci.getPosAsycPort()); |
|
|
|
this.starsAsycPort = Integer.parseInt(pci.getStarsAsycPort()); |
|
|
|
this.serverAddr = environment.getProperty("position-server.serverAddr"); |
|
|
|
this.timeAsycPort = Integer.parseInt(environment.getProperty("position-server.timeAsycPort")); |
|
|
|
this.posAsycPort = Integer.parseInt(environment.getProperty("position-server.posAsycPort")); |
|
|
|
this.starsAsycPort = Integer.parseInt(environment.getProperty("position-server.starsAsycPort")); |
|
|
|
//String serverAddr = positionConfigInfo.getServerAddr(); |
|
|
|
// try { |
|
|
|
// try { |
|
|
|