From dd69bfc1fb8e5e28dde754fab7f23bfb1a18faa5 Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期五, 05 六月 2026 16:58:07 +0800
Subject: [PATCH] config(dev): 更新开发环境配置和文件上传功能 - 调整文件上传路径配置 - 修复OA环境文件链接前缀配置 - 在审批实例服务中添加报销相关数据删除逻辑 - 实现申请人姓名自动填充功能 - 添加文件下载预览路由的正则表达式支持 - 为企业新闻VO添加附件列表兼容别名 - 完善员工入职服务的异常处理 - 新增账户附件管理控制器 - 实现文件上传接口并返回完整文件信息

---
 src/main/java/com/ruoyi/inspectiontask/service/impl/QuartzConfig.java |   20 +++++++++++++++++---
 1 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/src/main/java/com/ruoyi/inspectiontask/service/impl/QuartzConfig.java b/src/main/java/com/ruoyi/inspectiontask/service/impl/QuartzConfig.java
index da332f1..1644033 100644
--- a/src/main/java/com/ruoyi/inspectiontask/service/impl/QuartzConfig.java
+++ b/src/main/java/com/ruoyi/inspectiontask/service/impl/QuartzConfig.java
@@ -1,7 +1,8 @@
 package com.ruoyi.inspectiontask.service.impl;
 
+import lombok.RequiredArgsConstructor;
+import org.quartz.Scheduler;
 import org.quartz.spi.TriggerFiredBundle;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.config.AutowireCapableBeanFactory;
 import org.springframework.context.ApplicationContext;
 import org.springframework.context.ApplicationContextAware;
@@ -10,10 +11,16 @@
 import org.springframework.scheduling.quartz.SchedulerFactoryBean;
 import org.springframework.scheduling.quartz.SpringBeanJobFactory;
 
+import javax.sql.DataSource;
+
+
 @Configuration
+@RequiredArgsConstructor
 public class QuartzConfig {
-    @Autowired
-    private ApplicationContext applicationContext;
+    private final ApplicationContext applicationContext;
+
+    // 鍋囪宸查厤缃悕涓篸ataSource鐨勬暟鎹簮Bean
+    private final DataSource dataSource;
 
     @Bean
     public SchedulerFactoryBean schedulerFactoryBean() {
@@ -24,10 +31,17 @@
         jobFactory.setApplicationContext(applicationContext);
         schedulerFactory.setJobFactory(jobFactory);
 
+        // 鍦╯chedulerFactoryBean()鏂规硶涓坊鍔�
+        schedulerFactory.setDataSource(dataSource);
         // 鍏朵粬閰嶇疆...
         return schedulerFactory;
     }
 
+    @Bean
+    public Scheduler scheduler() {
+        return schedulerFactoryBean().getScheduler();
+    }
+
     // 鑷畾涔塉obFactory锛屾敮鎸佽嚜鍔ㄦ敞鍏�
     public static class AutowiringSpringBeanJobFactory extends SpringBeanJobFactory
             implements ApplicationContextAware {

--
Gitblit v1.9.3