bihuisong 3 mesi fa
parent
commit
4f5f6808ec

+ 2 - 0
src/main/java/com/sooka/sponest/monitor/dahua/controller/DahuaOperateLogBlackTask.java

@@ -25,6 +25,7 @@ import org.apache.http.impl.client.HttpClients;
 import org.apache.http.impl.client.LaxRedirectStrategy;
 import org.apache.http.ssl.SSLContextBuilder;
 import org.apache.http.util.EntityUtils;
+import org.springframework.scheduling.annotation.Async;
 import org.springframework.stereotype.Component;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -104,6 +105,7 @@ public class DahuaOperateLogBlackTask {
 //    private String userName = "system";
 //    private String userPwd = "Admin123";
 
+    @Async
     @RequestMapping(value = "/configureBlackTasks", method = POST)
     public void configureBlackTasks() {
         long startTimeMillis = System.currentTimeMillis(); // 记录开始时间

+ 2 - 0
src/main/java/com/sooka/sponest/monitor/dahua/controller/DahuaOperateLogWhiteTask.java

@@ -26,6 +26,7 @@ import org.apache.http.impl.client.LaxRedirectStrategy;
 import org.apache.http.ssl.SSLContextBuilder;
 import org.apache.http.util.EntityUtils;
 import org.springframework.beans.factory.annotation.Value;
+import org.springframework.scheduling.annotation.Async;
 import org.springframework.stereotype.Component;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
@@ -77,6 +78,7 @@ public class DahuaOperateLogWhiteTask {
 //    private String userPwd = "Admin123";
 
 
+    @Async
     @RequestMapping(value = "/configureWhiteTasks", method = POST)
     public void configureWhiteTasks() {
         long startTimeMillis = System.currentTimeMillis(); // 记录开始时间