소스 검색

截图定时优化

wyyay 10 달 전
부모
커밋
91532ec039
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      business-service/src/main/java/com/ozs/service/utils/FileUploader.java

+ 5 - 0
business-service/src/main/java/com/ozs/service/utils/FileUploader.java

@@ -1,4 +1,7 @@
 package com.ozs.service.utils;
+import com.ozs.service.service.impl.CameraCaptureService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.stereotype.Service;
 
 import java.io.*;
@@ -13,6 +16,7 @@ import java.net.URLConnection;
  */
 @Service
 public class FileUploader {
+    private static final Logger log = LoggerFactory.getLogger(FileUploader.class);
     String uploadUrl = "/data/test_picture/"; // 服务器URL
 
     public void transfer(String fileName, byte[] fileContent) throws Exception{
@@ -35,6 +39,7 @@ public class FileUploader {
 
             // 发送请求并获取响应
             int responseCode = connection.getResponseCode();
+            log.info("responseCode:"+responseCode);
             if (responseCode == HttpURLConnection.HTTP_OK) {
                 System.out.println("File uploaded successfully!");
             } else {