Browse Source

/*修改测试环境配置文件。*/

master
htjcAdmin 9 months ago
parent
commit
38b405be7e
3 changed files with 47 additions and 9 deletions
  1. +1
    -2
      src/main/java/com/inspect/tcpserver/tcp/NettyServer.java
  2. +5
    -5
      src/main/resources/application-test.yml
  3. +41
    -2
      src/main/resources/application.yml

+ 1
- 2
src/main/java/com/inspect/tcpserver/tcp/NettyServer.java View File

@ -140,7 +140,7 @@ public class NettyServer {
//发送消息
public void sendMsg(String client, boolean request, String xml) {
logger.info("[NETTY] Client: {} online: {}", client, clients.containsKey(client));
logger.info("[NETTY] Client: {} online: {}, xml: \n {}", client, clients.containsKey(client), xml);
if (clients.containsKey(client) && !StringUtil.isNullOrEmpty(xml)) {
ByteBuf byteBuf = Unpooled.copiedBuffer(xml, CharsetUtil.UTF_8);
int length = byteBuf.readableBytes();
@ -154,7 +154,6 @@ public class NettyServer {
allBuf.writeBytes(byteBuf);
allBuf.writeByte(0xEB);
allBuf.writeByte(0x90);
redisTemplate.opsForValue().set(String.valueOf(sendIndex), allBuf.toString(CharsetUtil.US_ASCII), 60L, TimeUnit.SECONDS);
nettyServerHandler.SendMsg(clients.get(client), allBuf);
logger.info("[NETTY] 向设备端机器人发送消息会话序列号: [{}], 接收端序列号: [{}]", sendIndex, receiveIndex);


+ 5
- 5
src/main/resources/application-test.yml View File

@ -17,16 +17,16 @@ server:
deviceServer:
serverIp: 127.0.0.1
serverPort: 10011
deviceServerCode: "192.168.1.66"
robotCode: "192.168.1.15"
nestCode: "192.168.1.16"
deviceCode: "192.168.1.15"
deviceServerCode: "INSPECT-SERVER-001"
robotCode: "DRONE-001"
nestCode: "NEST-001"
deviceCode: "DRONE-001"
upSystemServer:
serverIp: 10.10.18.100
serverPort: 10011
upCode: "192.168.1.99"
iipCode: "192.168.1.66"
iipCode: "INSPECT-SERVER-001"
iip_server:
send:


+ 41
- 2
src/main/resources/application.yml View File

@ -1,3 +1,42 @@
spring:
profiles:
active: prod
application:
name: tcpServer
redis:
host: 199.199.199.1
rabbitmq:
host: 199.199.199.4
port: 5672
username: guest
password: guest
server:
port: 22508
deviceServer:
serverIp: 127.0.0.1
serverPort: 10011
deviceServerCode: "192.168.1.116"
robotCode: "192.168.1.15"
nestCode: "192.168.1.16"
deviceCode: "192.168.1.15"
upSystemServer:
serverIp: 10.10.18.100
serverPort: 10011
upCode: "192.168.1.99"
iipCode: "192.168.1.66"
iip_server:
send:
url: http://199.199.199.104:9901/client/send
authDevice:
url: http://199.199.199.105:9902/eqpbook/checkPatrolDeviceIsExist/%s
up_time_interval_setting: time_interval_up_system_setting
boot:
client: true
server: true

Loading…
Cancel
Save