From 96eecc97de7fc863fc76b63294d4c12bd9683ae4 Mon Sep 17 00:00:00 2001 From: chenrui <1187576398@qq.com> Date: 星期二, 20 五月 2025 15:36:40 +0800 Subject: [PATCH] 回款台账 --- src/main/java/com/ruoyi/framework/config/ScheduleConfig.java | 114 ++++++++++++++++++++++++++++---------------------------- 1 files changed, 57 insertions(+), 57 deletions(-) diff --git a/src/main/java/com/ruoyi/framework/config/ScheduleConfig.java b/src/main/java/com/ruoyi/framework/config/ScheduleConfig.java index bd19e02..576d2c9 100644 --- a/src/main/java/com/ruoyi/framework/config/ScheduleConfig.java +++ b/src/main/java/com/ruoyi/framework/config/ScheduleConfig.java @@ -1,57 +1,57 @@ -package com.ruoyi.framework.config; - -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.scheduling.quartz.SchedulerFactoryBean; -import javax.sql.DataSource; -import java.util.Properties; - -/** - * 瀹氭椂浠诲姟閰嶇疆 - * - * @author ruoyi - */ -@Configuration -public class ScheduleConfig -{ - @Bean - public SchedulerFactoryBean schedulerFactoryBean(DataSource dataSource) - { - SchedulerFactoryBean factory = new SchedulerFactoryBean(); - factory.setDataSource(dataSource); - - // quartz鍙傛暟 - Properties prop = new Properties(); - prop.put("org.quartz.scheduler.instanceName", "RuoyiScheduler"); - prop.put("org.quartz.scheduler.instanceId", "AUTO"); - // 绾跨▼姹犻厤缃� - prop.put("org.quartz.threadPool.class", "org.quartz.simpl.SimpleThreadPool"); - prop.put("org.quartz.threadPool.threadCount", "20"); - prop.put("org.quartz.threadPool.threadPriority", "5"); - // JobStore閰嶇疆 - prop.put("org.quartz.jobStore.class", "org.quartz.impl.jdbcjobstore.JobStoreTX"); - // 闆嗙兢閰嶇疆 - prop.put("org.quartz.jobStore.isClustered", "true"); - prop.put("org.quartz.jobStore.clusterCheckinInterval", "15000"); - prop.put("org.quartz.jobStore.maxMisfiresToHandleAtATime", "1"); - prop.put("org.quartz.jobStore.txIsolationLevelSerializable", "true"); - - // sqlserver 鍚敤 - // prop.put("org.quartz.jobStore.selectWithLockSQL", "SELECT * FROM {0}LOCKS UPDLOCK WHERE LOCK_NAME = ?"); - prop.put("org.quartz.jobStore.misfireThreshold", "12000"); - prop.put("org.quartz.jobStore.tablePrefix", "QRTZ_"); - factory.setQuartzProperties(prop); - - factory.setSchedulerName("RuoyiScheduler"); - // 寤舵椂鍚姩 - factory.setStartupDelay(1); - factory.setApplicationContextSchedulerContextKey("applicationContextKey"); - // 鍙�夛紝QuartzScheduler - // 鍚姩鏃舵洿鏂板繁瀛樺湪鐨凧ob锛岃繖鏍峰氨涓嶇敤姣忔淇敼targetObject鍚庡垹闄rtz_job_details琛ㄥ搴旇褰曚簡 - factory.setOverwriteExistingJobs(true); - // 璁剧疆鑷姩鍚姩锛岄粯璁や负true - factory.setAutoStartup(true); - - return factory; - } -} +//package com.ruoyi.framework.config; +// +//import org.springframework.context.annotation.Bean; +//import org.springframework.context.annotation.Configuration; +//import org.springframework.scheduling.quartz.SchedulerFactoryBean; +//import javax.sql.DataSource; +//import java.util.Properties; +// +///** +// * 瀹氭椂浠诲姟閰嶇疆锛堝崟鏈洪儴缃插缓璁粯璁よ蛋鍐呭瓨锛屽闇�闆嗙兢闇�瑕佸垱寤簈rtz鏁版嵁搴撹〃/鎵撳紑绫绘敞閲婏級 +// * +// * @author ruoyi +// */ +//@Configuration +//public class ScheduleConfig +//{ +// @Bean +// public SchedulerFactoryBean schedulerFactoryBean(DataSource dataSource) +// { +// SchedulerFactoryBean factory = new SchedulerFactoryBean(); +// factory.setDataSource(dataSource); +// +// // quartz鍙傛暟 +// Properties prop = new Properties(); +// prop.put("org.quartz.scheduler.instanceName", "RuoyiScheduler"); +// prop.put("org.quartz.scheduler.instanceId", "AUTO"); +// // 绾跨▼姹犻厤缃� +// prop.put("org.quartz.threadPool.class", "org.quartz.simpl.SimpleThreadPool"); +// prop.put("org.quartz.threadPool.threadCount", "20"); +// prop.put("org.quartz.threadPool.threadPriority", "5"); +// // JobStore閰嶇疆 +// prop.put("org.quartz.jobStore.class", "org.springframework.scheduling.quartz.LocalDataSourceJobStore"); +// // 闆嗙兢閰嶇疆 +// prop.put("org.quartz.jobStore.isClustered", "true"); +// prop.put("org.quartz.jobStore.clusterCheckinInterval", "15000"); +// prop.put("org.quartz.jobStore.maxMisfiresToHandleAtATime", "10"); +// prop.put("org.quartz.jobStore.txIsolationLevelSerializable", "true"); +// +// // sqlserver 鍚敤 +// // prop.put("org.quartz.jobStore.selectWithLockSQL", "SELECT * FROM {0}LOCKS UPDLOCK WHERE LOCK_NAME = ?"); +// prop.put("org.quartz.jobStore.misfireThreshold", "12000"); +// prop.put("org.quartz.jobStore.tablePrefix", "QRTZ_"); +// factory.setQuartzProperties(prop); +// +// factory.setSchedulerName("RuoyiScheduler"); +// // 寤舵椂鍚姩 +// factory.setStartupDelay(1); +// factory.setApplicationContextSchedulerContextKey("applicationContextKey"); +// // 鍙�夛紝QuartzScheduler +// // 鍚姩鏃舵洿鏂板繁瀛樺湪鐨凧ob锛岃繖鏍峰氨涓嶇敤姣忔淇敼targetObject鍚庡垹闄rtz_job_details琛ㄥ搴旇褰曚簡 +// factory.setOverwriteExistingJobs(true); +// // 璁剧疆鑷姩鍚姩锛岄粯璁や负true +// factory.setAutoStartup(true); +// +// return factory; +// } +//} -- Gitblit v1.9.3