Browse Source

配置文件

15044148858 1 month ago
parent
commit
4587475395

+ 2 - 2
zhjq-admin/src/main/resources/application.yml

@@ -7,8 +7,8 @@ ruoyi:
   # 版权年份
   copyrightYear: 2024
   # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
-#  profile: /a-zhjq/zhjq/uploadPath
-  profile: D:/ruoyi/uploadPath
+  profile: /a-zhjq/zhjq/uploadPath
+#  profile: D:/ruoyi/uploadPath
   # 获取ip地址开关
   addressEnabled: false
   # 验证码类型 math 数字计算 char 字符验证

+ 3 - 0
zhjq-business/src/main/java/com/zhjq/quartz/PersonCountGroupJob.java

@@ -27,6 +27,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.Scheduled;
 import org.springframework.stereotype.Component;
 
 import javax.annotation.Resource;
@@ -63,6 +64,8 @@ public class PersonCountGroupJob {
     private final String appSecret1 = "73e68e1ea7b3757a96ff847b97a20ed161746e30";
 
 
+    // 使用 cron 表达式配置每30分钟执行一次
+    @Scheduled(cron = "0 */30 * * * ?")
     public void getPersonCountGroup() throws Exception {
         log.info("开始执行海康获取客流量统计定时任务");
         List<ZhjqPassengerFlow> list = PersonCountGroupURL.PersonCountGroupURL(host, appKey, appSecret);