Procházet zdrojové kódy

修改到docker外运行环境

tags/v1.0.0^2
林万龙 před 4 roky
rodič
revize
4d006ec8b5
2 změnil soubory, kde provedl 7 přidání a 1 odebrání
  1. +3
    -0
      src/main/java/com/telpo/dipperposition/handler/NettyServerHandler.java
  2. +4
    -1
      src/main/java/com/telpo/dipperposition/server/DipperPositionServer.java

+ 3
- 0
src/main/java/com/telpo/dipperposition/handler/NettyServerHandler.java Zobrazit soubor

@@ -42,10 +42,13 @@ public class NettyServerHandler extends ChannelInboundHandlerAdapter {
private static String AST_POS_CMD_BYTE = "504f53"; private static String AST_POS_CMD_BYTE = "504f53";
private static String AST_EPH_CMD_BYTE = "455048"; private static String AST_EPH_CMD_BYTE = "455048";


@Autowired
private IDipperAstTimeAsyncTaskService dipperTimeAsyncTaskService; private IDipperAstTimeAsyncTaskService dipperTimeAsyncTaskService;


@Autowired
private IDipperAstPosAsyncTaskService dipperAstPosAsyncTaskService; private IDipperAstPosAsyncTaskService dipperAstPosAsyncTaskService;


@Autowired
private IDipperDataAsyncTaskService dipperDataAsyncTaskService; private IDipperDataAsyncTaskService dipperDataAsyncTaskService;


@Autowired @Autowired


+ 4
- 1
src/main/java/com/telpo/dipperposition/server/DipperPositionServer.java Zobrazit soubor

@@ -3,7 +3,9 @@ package com.telpo.dipperposition.server;
import com.alibaba.nacos.api.NacosFactory; import com.alibaba.nacos.api.NacosFactory;
import com.alibaba.nacos.api.PropertyKeyConst; import com.alibaba.nacos.api.PropertyKeyConst;
import com.alibaba.nacos.api.config.ConfigService; import com.alibaba.nacos.api.config.ConfigService;
import com.alibaba.nacos.api.config.annotation.NacosValue;
import com.alibaba.nacos.api.exception.NacosException; import com.alibaba.nacos.api.exception.NacosException;
import com.alibaba.nacos.spring.context.annotation.config.NacosPropertySource;
import com.telpo.dipperposition.co.PositionConfigInfo; import com.telpo.dipperposition.co.PositionConfigInfo;
import com.telpo.dipperposition.handler.ServerChannelInitializer; import com.telpo.dipperposition.handler.ServerChannelInitializer;
import io.netty.bootstrap.ServerBootstrap; import io.netty.bootstrap.ServerBootstrap;
@@ -27,9 +29,10 @@ import java.net.InetSocketAddress;
*/ */
@Slf4j @Slf4j
@Component @Component
@NacosPropertySource(dataId="dipperposition-service", autoRefreshed=true)
public class DipperPositionServer { public class DipperPositionServer {


@Value("position-server.serverAddr")
@NacosValue("position-server.serverAddr")
private String myServerAddr; private String myServerAddr;
private String serverAddr; private String serverAddr;
private Integer starsAsycPort; private Integer starsAsycPort;


Načítá se…
Zrušit
Uložit