|
@@ -176,14 +176,17 @@ public class DataService {
|
|
|
|
|
|
public List<BugDetail> saveBugDetailFromOss(String zipFilePath,String jsonFilePath, String originalCaseId, String cpSerialNum) {
|
|
|
try {
|
|
|
- //从oss下载json文件
|
|
|
- URL url = new URL(jsonFilePath);
|
|
|
- URLConnection urlConnection = url.openConnection();
|
|
|
- HttpURLConnection httpURLConnection = (HttpURLConnection) urlConnection;
|
|
|
- httpURLConnection.setConnectTimeout(1000 * 5);
|
|
|
- httpURLConnection.setRequestProperty("Charset", "UTF-8");
|
|
|
- httpURLConnection.connect();
|
|
|
- BufferedInputStream bufferedInputStream = new BufferedInputStream(httpURLConnection.getInputStream());
|
|
|
+// //从oss下载json文件
|
|
|
+// URL url = new URL(jsonFilePath);
|
|
|
+// URLConnection urlConnection = url.openConnection();
|
|
|
+// HttpURLConnection httpURLConnection = (HttpURLConnection) urlConnection;
|
|
|
+// httpURLConnection.setConnectTimeout(1000 * 5);
|
|
|
+// httpURLConnection.setRequestProperty("Charset", "UTF-8");
|
|
|
+// httpURLConnection.connect();
|
|
|
+ //读取本地文件
|
|
|
+ File jsonFile=new File(jsonFilePath);
|
|
|
+// BufferedInputStream bufferedInputStream = new BufferedInputStream(httpURLConnection.getInputStream());
|
|
|
+ BufferedInputStream bufferedInputStream = new BufferedInputStream(new FileInputStream(jsonFile));
|
|
|
ByteArrayOutputStream buf = new ByteArrayOutputStream();
|
|
|
int result = bufferedInputStream.read();
|
|
|
while (result != -1) {
|