pom提交
This commit is contained in:
@@ -21,16 +21,16 @@
|
|||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
<!--pq-device-boot和pms-device-boot只能选择一个-->
|
<!--pq-device-boot和pms-device-boot只能选择一个-->
|
||||||
<!-- <dependency>-->
|
|
||||||
<!-- <groupId>com.njcn</groupId>-->
|
|
||||||
<!-- <artifactId>pq-device-boot</artifactId>-->
|
|
||||||
<!-- <version>${project.version}</version>-->
|
|
||||||
<!-- </dependency>-->
|
|
||||||
<dependency>
|
<dependency>
|
||||||
|
<groupId>com.njcn</groupId>
|
||||||
|
<artifactId>pq-device-boot</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- <dependency>
|
||||||
<groupId>com.njcn</groupId>
|
<groupId>com.njcn</groupId>
|
||||||
<artifactId>pms-device-boot</artifactId>
|
<artifactId>pms-device-boot</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>-->
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.njcn</groupId>
|
<groupId>com.njcn</groupId>
|
||||||
|
|||||||
@@ -6,10 +6,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import net.sf.json.JSONObject;
|
import net.sf.json.JSONObject;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.*;
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.InputStreamReader;
|
|
||||||
import java.io.OutputStream;
|
|
||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
import java.net.Socket;
|
import java.net.Socket;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
@@ -72,6 +69,17 @@ public class SocketClientComm {
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|
||||||
}finally{
|
}finally{
|
||||||
|
|
||||||
|
|
||||||
|
//System.out.println("end---");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private void safeCloseStream(InputStream in,OutputStream out,Socket socket){
|
||||||
//一些必要的清理工作
|
//一些必要的清理工作
|
||||||
if(in != null){
|
if(in != null){
|
||||||
try {
|
try {
|
||||||
@@ -97,10 +105,6 @@ public class SocketClientComm {
|
|||||||
}
|
}
|
||||||
socket = null;
|
socket = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
//System.out.println("end---");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user