Commit 1c60a80a authored by zhushanglei's avatar zhushanglei

gps数据采集修改redis

parent 167ed878
...@@ -31,6 +31,9 @@ public class TcpClient { ...@@ -31,6 +31,9 @@ public class TcpClient {
public static String HOST; public static String HOST;
public static String PORT; public static String PORT;
public static String deviceId ; public static String deviceId ;
public static String redisHost ;
public static int redisPort;
public static String redisPass;
static { static {
InputStream in = ClassLoader.getSystemResourceAsStream("config.properties"); InputStream in = ClassLoader.getSystemResourceAsStream("config.properties");
...@@ -109,6 +112,9 @@ public class TcpClient { ...@@ -109,6 +112,9 @@ public class TcpClient {
InputStream in = ClassLoader.getSystemResourceAsStream("config.properties"); InputStream in = ClassLoader.getSystemResourceAsStream("config.properties");
config.load(in); config.load(in);
TcpClientHandler.serverUrl = config.getProperty("serverUrl"); TcpClientHandler.serverUrl = config.getProperty("serverUrl");
redisHost = config.getProperty("redis.host");
redisPort = Integer.parseInt(config.getProperty("redis.port"));
redisPass = config.getProperty("redis.pass");
logger.info("服务器后端接口>>" + TcpClientHandler.serverUrl); logger.info("服务器后端接口>>" + TcpClientHandler.serverUrl);
TcpClient.sendMsg(client); TcpClient.sendMsg(client);
......
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