From a2312c7a34971aa5d0122fa179f5b8d1da28e78c Mon Sep 17 00:00:00 2001
From: kongdeqiang <kongdeqiang960204@163.com>
Date: 星期五, 19 四月 2024 11:20:27 +0800
Subject: [PATCH] fix:新增手持接口

---
 src/main/java/com/boying/controller/car/PlateServlet2.java |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/boying/controller/car/PlateServlet2.java b/src/main/java/com/boying/controller/car/PlateServlet2.java
index 1d17a39..302f3a5 100644
--- a/src/main/java/com/boying/controller/car/PlateServlet2.java
+++ b/src/main/java/com/boying/controller/car/PlateServlet2.java
@@ -17,6 +17,8 @@
 
 import com.sun.media.jfxmedia.track.Track;
 import lombok.RequiredArgsConstructor;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.data.redis.core.StringRedisTemplate;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.PostMapping;
@@ -46,7 +48,10 @@
 @RequiredArgsConstructor
 public class PlateServlet2 extends HttpServlet {
     private static final long serialVersionUID = 1L;
-    private final SystemConfigProperties systemConfigProperties;
+    @Value("${ffpark.logPath}")
+    private String logPath;
+//    @Autowired
+//    private final SystemConfigProperties systemConfigProperties;
     private final StringRedisTemplate redisTemplate;
     private final ParkService parkService;
     private final OutParkService outParkService;
@@ -294,7 +299,7 @@
         SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
         try
         {
-            FileWriter f = new FileWriter(systemConfigProperties.getLogPath()+sdf.format(new Date())+".txt",true);
+            FileWriter f = new FileWriter(logPath+sdf.format(new Date())+".txt",true);
             BufferedWriter bw=new BufferedWriter(f);
             bw.write(txt);
             bw.newLine();

--
Gitblit v1.9.1