Browse Source

加入测试用的接口

Yangzw 1 month ago
parent
commit
137dd938bc

+ 4 - 2
feifan-module-infra/feifan-module-infra-biz/src/main/java/cn/newfeifan/mall/module/infra/controller/admin/file/FileController.java

@@ -129,8 +129,6 @@ public class FileController {
         Request request = new Request.Builder()
                 .url("http://127.0.0.1:5000/recognize_plate")
                 .method("POST", body)
-                .addHeader("Authorization", "Bearer 964ae94dba204fa0bd3bcc5c27604d7e")
-                .addHeader("User-Agent", "Apifox/1.0.0 (https://apifox.com)")
                 .addHeader("Accept", "*/*")
                 .addHeader("Host", "127.0.0.1:5000")
                 .addHeader("Connection", "keep-alive")
@@ -142,7 +140,11 @@ public class FileController {
             // 直接将响应体的字符串内容解析为Map(简单示例,如果有对应Java POJO类,可以解析为具体的POJO对象)
             @SuppressWarnings("unchecked")
             Map<String, Object> resultMap = objectMapper.readValue(response.body().string(), Map.class);
+            resultMap.forEach((k, v) -> {
+                log.info("=====k:{},v:{}",k,v);
+            });
             Object data = resultMap.get("data");
+            log.info("=====data:{}",data);
             if (data.equals("success")) {
                 System.out.println("解析后的plate_number值: " + resultMap.get("plate_number"));
                 return success(resultMap.get("plate_number").toString());