pom提交

This commit is contained in:
2023-08-14 11:07:54 +08:00
parent 4d4f1f8344
commit a6271b9c13
2 changed files with 39 additions and 35 deletions

View File

@@ -21,16 +21,16 @@
<dependencies>
<!--pq-device-boot和pms-device-boot只能选择一个-->
<!-- <dependency>-->
<!-- <groupId>com.njcn</groupId>-->
<!-- <artifactId>pq-device-boot</artifactId>-->
<!-- <version>${project.version}</version>-->
<!-- </dependency>-->
<dependency>
<groupId>com.njcn</groupId>
<artifactId>pq-device-boot</artifactId>
<version>${project.version}</version>
</dependency>
<!-- <dependency>
<groupId>com.njcn</groupId>
<artifactId>pms-device-boot</artifactId>
<version>${project.version}</version>
</dependency>
</dependency>-->
<dependency>
<groupId>com.njcn</groupId>

View File

@@ -6,10 +6,7 @@ import lombok.extern.slf4j.Slf4j;
import net.sf.json.JSONObject;
import org.springframework.stereotype.Component;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.*;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.nio.charset.StandardCharsets;
@@ -72,6 +69,17 @@ public class SocketClientComm {
e.printStackTrace();
}finally{
//System.out.println("end---");
}
}
private void safeCloseStream(InputStream in,OutputStream out,Socket socket){
//一些必要的清理工作
if(in != null){
try {
@@ -97,10 +105,6 @@ public class SocketClientComm {
}
socket = null;
}
//System.out.println("end---");
}
}