- 浏览: 1126307 次
- 性别:
- 来自: 上海
文章分类
- 全部博客 (1055)
- quartz定时任务 (1)
- json (9)
- 接口 (1)
- http (1)
- sccket (2)
- xmlbean (1)
- webservice (1)
- flex (1)
- sitemesh (2)
- json组装 (2)
- 存储过程 (6)
- ajax后台返回前台上下问 (3)
- flect反射机制 (1)
- 页面列表 (1)
- oracal结果集合并 (1)
- lucene (1)
- 读取配置文件工具 (1)
- 框架整合 (1)
- jms (3)
- 断点续传 (1)
- 页面之间的传值 (1)
- jpa (6)
- sql (8)
- jsp跳转 (1)
- jsp (6)
- jquery (2)
- ui (1)
- js与jsp之间的值的交互应用 (1)
- js空值判断 (1)
- Ajax (9)
- web-inf 编译目录 (1)
- 多线程 (9)
- 资料 (0)
- oracal (4)
- 多线程webservice (1)
- ztree (1)
- 加载与内容的变化 (1)
- 页面的公用变量 (1)
- web-inf目录结构 (1)
- 登陆系列 (1)
- jass应用于webservice认证 (2)
- 路径问题 (1)
- list合并 (1)
- list map中的value获取 (2)
- 标签tag (4)
- 方法 (1)
- 树形数据及其渲染 (1)
- require js 回调 (1)
- tab 页面切换 (2)
- 计时获取验证码 (1)
- 模式 (6)
- easyui (3)
- dialog (2)
- 乱码问题 (1)
- spring (29)
- sqlserver (1)
- iis,netframework (0)
- iis (1)
- netframework (1)
- 处理乱码问题 (1)
- struts-ajax (0)
- ,理论,了;,; (0)
- 排错方法 (1)
- hibernate (1)
- 二级缓存 (1)
- portal (1)
- date类型 (0)
- jvm out of memery StackOverflowError (1)
- echart数据填充 (0)
- echart (1)
- jmv (1)
- 学习 (0)
- java基础 (1)
- oracle性能优化 (1)
- 数据库三范式 (1)
- easy UI (1)
- oracle11g (1)
- form (3)
- servlet (2)
- spring mvc (1)
- htm5 (0)
- ibatise (1)
- 序列化 (1)
- tomcat双认证 (1)
- maven Lib (1)
- tomcat eclipse (2)
- ehcache (1)
- http 代替 ajax (2)
- rest (6)
- script脚本占位模板 (1)
- strust 标签 el表达式 (1)
- js bo (1)
- 公司资料 (0)
- js return (1)
- spring 第三方插件的工具类 (1)
- linux (10)
- linux 克隆 (1)
- linux xshell连接 (1)
- yum expect (1)
- linux 应用命令 (1)
- yum 缓存rmp包 (1)
- yum 本地库离线安装 (2)
- yum错误 (1)
- jsp页面用定时调用 (1)
- ajax setup (2)
- Exception,RuntimeException (1)
- 对话框 dialog (1)
- maven (17)
- PropertyPlaceholderConfigurer properties文件 (1)
- 错误集 (1)
- mybatise (0)
- 拦截器filter (1)
- http get post 区别 (1)
- rest 客户端两种返回的数据处理方式 (1)
- listener (2)
- maven工程 (1)
- ContainerResponseFilter (1)
- ajax action 打印任意实体类jsp (1)
- yum svn mvn (1)
- 分页 (1)
- angularjs (1)
- memcached (1)
- git (12)
- yyyyyyyy (0)
- oracal安装 (4)
- jaxwswebservice (1)
- spring bean (1)
- 排方法 (0)
- java 生成pdf (2)
- 创建目录 (1)
- 下载与生产pdf文件 (1)
- base64 (2)
- 配置文件 (2)
- blob (1)
- pdf (1)
- yum linux 安装Oracle (1)
- excl 插入数据库 (1)
- 搭建框架 (1)
- .classpath和jdk jre (1)
- mybatise 配置文件通配 (1)
- 用Maven插件生成Mybatis代码 (2)
- springmvc值的传递 (1)
- js jsp html (1)
- ajax跨域 (1)
- javamail (0)
- 提交复杂格式json数据 (1)
- get中文乱码/post (1)
- 弹出框,承载弹出链接----页面,显示大图 (1)
- @RequestBody list bean (1)
- 隐藏域 (1)
- 多页保存 (1)
- form 校验 (1)
- 注册,上传图片 (1)
- 登录验证 (1)
- 全局的异常处理 (0)
- 异常捕获,显示在页面 (0)
- mybatise事物配置 (1)
- maven compile (1)
- 时间格式 (1)
- js 跳转页面 (1)
- pringsecurity 角色授资源要重启服务 (0)
- Retrofi restfull (1)
- session过期推出,直接点击退出,退出 (0)
- 参数放于requestbody (1)
- maven本地仓库jar包 (1)
- 编译环境出错jdk1.6 1,7 (1)
- jsonarray ---json数组格式 (1)
- java后台文件上传,接受的2种方式 (0)
- 生成保存图片 (1)
- 权限mysql数据库Md5加密sql (1)
- mysql一对多关联查询 (1)
- mysql批量更新 (0)
- oracle in exists 区别 (1)
- https (1)
- linux发布脚本 (1)
- dubbo zookeepr (1)
- request.getParameter() (1)
- request.setAttribute() (1)
- @RequestMapping @ResponseBody (1)
- @RequestMapping @responsebody src控件 后台如何写入src值 (1)
- dwz (8)
- lib jar maven (1)
- web服务访问名称 (1)
- mvc返回内容设置,拦截 (1)
- @ResponseBody 返回json处理 (1)
- 视图,函数,存储过程 (1)
- <context:annotation-config/> (1)
- <context:component-scan/> (1)
- xml路劲通配 (2)
- 杂项 (1)
- dubbo (34)
- redis (25)
- mybatis (34)
- springmvc (15)
- js (7)
- sprinvmvc (1)
- 设计理念 (1)
- 工程 (1)
- 其他 (149)
- 导出,下载 (1)
- session (4)
- token (1)
- Exception处理 (2)
- 注解 (2)
- 框架 (3)
- shrio (1)
- login (1)
- 项目结构设计 (1)
- mybatis两种关联查询 (1)
- mybaits (2)
- 迭代模式 (1)
- oralce树形数据结构构建 (2)
- 树形结构的jsp展现 (1)
- filter intecept(Struts) (1)
- 树形结构数据的提交 (1)
- @RequestBody @RequestParam (1)
- div (1)
- equals重写 (1)
- 程序设计 (1)
- f多层for循环跳出 (1)
- 看源码 (0)
- 权限系统普遍通性 (1)
- 设计程序 (1)
- 动态拼接元素样式问题 (1)
- sql迭代 (1)
- debug断点 (1)
- spring mvc 扫描注解(ioc (1)
- di) (1)
- jdk (2)
- cglib (1)
- mybatis 多层括号(超过三层)解析不了 (1)
- tiles (2)
- cacheManager缓存的切换 (1)
- jsp,xml中el表达式等占位符中的数据操作 (1)
- jpa 及spring data jpa开发 (1)
- compareTo equals toString (1)
- 子页面用父页面js (1)
- jsp相对路径自加问题 (1)
- bean之间的相互拷贝 (1)
- DECODE (2)
- 泛型 (2)
- NVL (1)
- jsp jstl函数 用标签声明页面变量,供jstl使用,时间格式问题 (1)
- form表单切换action值 (1)
- response.getWriter().write()功能优于springMvc的返回 (1)
- 快速复制构建项目 (1)
- activeMq (15)
- cache (2)
- sql获取序列号 (1)
- 上传 (2)
- tfs (1)
- jsp标签 (2)
- qita (1)
- 触发器 (1)
- Exception (1)
- mybais (1)
- 标签 (1)
- connect by (1)
- for ... in (1)
- map转化为list (1)
- 树形结构list构建(树形实体) (1)
- 左侧菜单的设计 (1)
- response.getWriter().write() (1)
- eclipse打断点之后断无效 (1)
- 直接访问/web-inf/下的页面 (1)
- clob (1)
- freemark (1)
- 框架的设计 (1)
- get方式处理乱码 (1)
- Request的getParameter和getAttribute方法的区别 (1)
- cas (9)
- 时间格式问题 (1)
- ResponseUtil.writeToResponse (1)
- 树形数据的反选 (1)
- spring data jpa (1)
- jsp异常提示 (1)
- jquery js (1)
- eclipse (1)
- 乱码 (1)
- Json OBJETC (1)
- PROCEDURE (1)
- pl/sql oracle (1)
- 设计 (1)
- el表达式 (3)
- iframe (1)
- map (1)
- jsp中调用Java (1)
- response.getWriter().write() ajax (1)
- mybatis xml 传入参数 (0)
- response与request在返回时作用区别 (1)
- spring cache (1)
- 模型驱动 (1)
- 关于mybatis传空值的处理 (1)
- 日志配置 (1)
- mapper (1)
- mapper mybatis (1)
- mapper mybatis-spring spring-data-jpa (1)
- js插件 (1)
- spring-data-jpa (2)
- 字节流转化过程 (1)
- 数据库 (11)
- jsp页面 (1)
- 局域网络访问问题 (1)
- plsql (2)
- response (1)
- plsq (1)
- Proxool (1)
- cas security (1)
- 系统配置化 (1)
- 集群 (4)
- springboot (24)
- 设计模式 (5)
- 通知 (1)
- 架构 (48)
- zookeeper (5)
- mvc框架 (1)
- 事物隔离策略 (1)
- jvm (8)
- 调研 (1)
- Java工具类 (1)
- 并发容器 (3)
- 多线程管理器 (4)
- 简历 (0)
- 查询 (1)
- 集群工具 (1)
- springMcv (1)
- ConcurrentHashMap (1)
- hashtable (1)
- cac (1)
- 树形结构 (1)
- 定时任务 (1)
- tortoiseGit (2)
- struts (11)
- shiro (31)
- log4j (3)
- struts2 (2)
- 编码 (1)
- request (3)
- Nginx (14)
- tomcat (1)
- idea (12)
- mvc (2)
- BeanUtils (2)
- image (1)
- mino (1)
- httpClient (1)
- volecity (1)
- swagger (3)
- 调错 (0)
- data (1)
- log (1)
- shell (1)
- 事物 (3)
- junit (1)
- RestTemplate (2)
- 线程 (0)
- Exception异常处理 (1)
- Exception异常注解 (1)
- lock (1)
- HashMap (1)
- 面试 (0)
- rabbitMq (1)
- rainCat (1)
- 其它 (1)
- activemq消息传送机制以及ACK机制详解 (0)
- mysql (7)
- fildder (1)
- UML (1)
- 校验 (1)
- 反射 (1)
- 切面 (1)
- springioc (1)
- urule2 (0)
- skywalking (1)
- urule (2)
- docker (2)
- 前端 (1)
- bootstrap (1)
- eureka (2)
- springcloud (16)
- jenkins (2)
- springsecurity (1)
- 数据结构 (4)
- gradle (1)
- mycat (3)
- nacos (1)
- canary (1)
- 线程池 (1)
- solr (1)
- resteasy (2)
- BI (1)
- dfs (2)
- elasticsearch (1)
- ruby (1)
- logstash (1)
- clickhouse (2)
- davinci (15)
- java (1)
- davinvi (1)
- fastdfs (1)
- vue (1)
- 《将博客搬至CSDN》 (1)
最新评论
-
nizhipeng123:
private SessionFactory sessio ...
用map接收参数的几个注意的问题
<bean id="simple" lazy-init="false" class="com.ces.interfaceSchdule.utils.InterfaceJobTrigger" init-method="run" >
</bean>
trigger:
/*
* Copyright 2005 - 2009 Terracotta, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy
* of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
*/
package com.ces.interfaceSchdule.utils;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.quartz.JobDataMap;
import org.quartz.JobDetail;
import org.quartz.Scheduler;
import org.quartz.SchedulerFactory;
import org.quartz.SimpleTrigger;
import org.quartz.TriggerUtils;
import org.quartz.impl.StdSchedulerFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.ces.zwww.entity.ScheduleInfo;
import com.ces.zwww.service.ScheduleInfoLogService;
import com.ces.zwww.service.ScheduleInfoService;
/**
* This Example will demonstrate all of the basics of scheduling capabilities of
* Quartz using Simple Triggers.
*
* @author Bill Kratzer
*/
@Component
public class InterfaceJobTrigger {
@Autowired
private ScheduleInfoService shser;
@Autowired
private ScheduleInfoLogService shserver;
@Autowired
private InterfaceJob simpleJob;
public void run() throws Exception {
Logger log = LoggerFactory.getLogger(InterfaceJobTrigger.class);
List<ScheduleInfo> shIn = new ArrayList<ScheduleInfo>();
shIn = shser.getScheduleInfo();
//First we must get a reference to a scheduler
SchedulerFactory sf = new StdSchedulerFactory();
Scheduler sched = sf.getScheduler();
long ts = 0;
ts = TriggerUtils.getNextGivenSecondDate(null, 15).getTime();
for (int i = 0; i < shIn.size(); i++) {
int zt =Integer.parseInt(shIn.get(i).getCfqzt());
if(zt==1){
String jobName = shIn.get(i).getRwmc();
String jobgroup = shIn.get(i).getRwfz();
String triggerName = shIn.get(i).getCfqmc();
String triggergroup = shIn.get(i).getCfqmc();
Long pl = Long.parseLong(shIn.get(i).getDspl());
JobDetail job = new JobDetail(jobName, jobgroup, simpleJob.getClass());
JobDataMap jobDataMap = new JobDataMap();
jobDataMap.put("interfaceName", shIn.get(i).getInterfacename());
jobDataMap.put("interfaceMethod", shIn.get(i).getMethod());
job.setJobDataMap(jobDataMap);
SimpleTrigger trigger = new SimpleTrigger(triggerName,
triggergroup, jobName, jobgroup, new Date(ts), null,
SimpleTrigger.REPEAT_INDEFINITELY, pl * 1000);
// CronTrigger trigger = new CronTrigger(triggerName,triggergroup,jobName
// ,jobgroup,new Date(ts),null,shIn.get(i).getDspl());
Date ft = sched.scheduleJob(job, trigger);
log.info(job.getFullName() + " will run at: " + ft
+ " and CronExpression: " + trigger.getJobName()
+ " Name " + trigger.getName());
log.info("job7 rescheduled to run at: " + ft);
sched.start();
// ScheduleInfoLog schLog = new ScheduleInfoLog();
// schLog.setId(i+5+"");
// schLog.setRwid(shIn.get(i));
// shserver.save(schLog);
}
}
}
}
job:
/*
* Copyright 2005 - 2009 Terracotta, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy
* of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
*/
package com.ces.interfaceSchdule.utils;
import java.lang.reflect.Method;
import org.quartz.Job;
import org.quartz.JobDataMap;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.context.ContextLoader;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils;
/**
* <p>
* This is just a simple job that gets fired off many times by example 1
* </p>
*
* @author Bill Kratzer
*/
@Component
public class InterfaceJob implements Job {
private static Logger _log = LoggerFactory.getLogger(InterfaceJob.class);
private String interfaceName;
private String interfaceMethod;
public InterfaceJob() {
}
/**
* <p>
* Called by the <code>{@link org.quartz.Scheduler}</code> when a
* <code>{@link org.quartz.Trigger}</code> fires that is associated with the
* <code>Job</code>.
* </p>
*
* @throws JobExecutionException
* if there is an exception while executing the job.
*/
public void execute(JobExecutionContext context)
throws JobExecutionException {
//
setJobParam(context);
// This job simply prints out its job name and the
// date and time that it is running
try {
WebApplicationContext ctx = ContextLoader
.getCurrentWebApplicationContext();
Object object = WebApplicationContextUtils
.getWebApplicationContext(ctx.getServletContext()).getBean(
getInterfaceClass());
if(getInterfaceMethod()!=null&&object!=null)
getInterfaceMethod().invoke(object);
// netManagerTaskService.getTicketMsg();
} catch (Exception e) {
e.printStackTrace();
}
}
/**
*
*/
private void setJobParam(JobExecutionContext context) {
JobDataMap jobDataMap = context.getJobDetail().getJobDataMap();
interfaceName = jobDataMap.getString("interfaceName");
interfaceMethod = jobDataMap.getString("interfaceMethod");
}
/**
* 获取当前参数的类
*
* @return
*/
private Class getInterfaceClass() {
try {
return Class.forName(interfaceName);
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
return null;
}
/**
*
* @return
*/
private Method getInterfaceMethod() {
try {
return getInterfaceClass().getMethod(interfaceMethod);
} catch (SecurityException e) {
e.printStackTrace();
} catch (NoSuchMethodException e) {
e.printStackTrace();
}
return null;
}
}
</bean>
trigger:
/*
* Copyright 2005 - 2009 Terracotta, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy
* of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
*/
package com.ces.interfaceSchdule.utils;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.quartz.JobDataMap;
import org.quartz.JobDetail;
import org.quartz.Scheduler;
import org.quartz.SchedulerFactory;
import org.quartz.SimpleTrigger;
import org.quartz.TriggerUtils;
import org.quartz.impl.StdSchedulerFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.ces.zwww.entity.ScheduleInfo;
import com.ces.zwww.service.ScheduleInfoLogService;
import com.ces.zwww.service.ScheduleInfoService;
/**
* This Example will demonstrate all of the basics of scheduling capabilities of
* Quartz using Simple Triggers.
*
* @author Bill Kratzer
*/
@Component
public class InterfaceJobTrigger {
@Autowired
private ScheduleInfoService shser;
@Autowired
private ScheduleInfoLogService shserver;
@Autowired
private InterfaceJob simpleJob;
public void run() throws Exception {
Logger log = LoggerFactory.getLogger(InterfaceJobTrigger.class);
List<ScheduleInfo> shIn = new ArrayList<ScheduleInfo>();
shIn = shser.getScheduleInfo();
//First we must get a reference to a scheduler
SchedulerFactory sf = new StdSchedulerFactory();
Scheduler sched = sf.getScheduler();
long ts = 0;
ts = TriggerUtils.getNextGivenSecondDate(null, 15).getTime();
for (int i = 0; i < shIn.size(); i++) {
int zt =Integer.parseInt(shIn.get(i).getCfqzt());
if(zt==1){
String jobName = shIn.get(i).getRwmc();
String jobgroup = shIn.get(i).getRwfz();
String triggerName = shIn.get(i).getCfqmc();
String triggergroup = shIn.get(i).getCfqmc();
Long pl = Long.parseLong(shIn.get(i).getDspl());
JobDetail job = new JobDetail(jobName, jobgroup, simpleJob.getClass());
JobDataMap jobDataMap = new JobDataMap();
jobDataMap.put("interfaceName", shIn.get(i).getInterfacename());
jobDataMap.put("interfaceMethod", shIn.get(i).getMethod());
job.setJobDataMap(jobDataMap);
SimpleTrigger trigger = new SimpleTrigger(triggerName,
triggergroup, jobName, jobgroup, new Date(ts), null,
SimpleTrigger.REPEAT_INDEFINITELY, pl * 1000);
// CronTrigger trigger = new CronTrigger(triggerName,triggergroup,jobName
// ,jobgroup,new Date(ts),null,shIn.get(i).getDspl());
Date ft = sched.scheduleJob(job, trigger);
log.info(job.getFullName() + " will run at: " + ft
+ " and CronExpression: " + trigger.getJobName()
+ " Name " + trigger.getName());
log.info("job7 rescheduled to run at: " + ft);
sched.start();
// ScheduleInfoLog schLog = new ScheduleInfoLog();
// schLog.setId(i+5+"");
// schLog.setRwid(shIn.get(i));
// shserver.save(schLog);
}
}
}
}
job:
/*
* Copyright 2005 - 2009 Terracotta, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy
* of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
*/
package com.ces.interfaceSchdule.utils;
import java.lang.reflect.Method;
import org.quartz.Job;
import org.quartz.JobDataMap;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.context.ContextLoader;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils;
/**
* <p>
* This is just a simple job that gets fired off many times by example 1
* </p>
*
* @author Bill Kratzer
*/
@Component
public class InterfaceJob implements Job {
private static Logger _log = LoggerFactory.getLogger(InterfaceJob.class);
private String interfaceName;
private String interfaceMethod;
public InterfaceJob() {
}
/**
* <p>
* Called by the <code>{@link org.quartz.Scheduler}</code> when a
* <code>{@link org.quartz.Trigger}</code> fires that is associated with the
* <code>Job</code>.
* </p>
*
* @throws JobExecutionException
* if there is an exception while executing the job.
*/
public void execute(JobExecutionContext context)
throws JobExecutionException {
//
setJobParam(context);
// This job simply prints out its job name and the
// date and time that it is running
try {
WebApplicationContext ctx = ContextLoader
.getCurrentWebApplicationContext();
Object object = WebApplicationContextUtils
.getWebApplicationContext(ctx.getServletContext()).getBean(
getInterfaceClass());
if(getInterfaceMethod()!=null&&object!=null)
getInterfaceMethod().invoke(object);
// netManagerTaskService.getTicketMsg();
} catch (Exception e) {
e.printStackTrace();
}
}
/**
*
*/
private void setJobParam(JobExecutionContext context) {
JobDataMap jobDataMap = context.getJobDetail().getJobDataMap();
interfaceName = jobDataMap.getString("interfaceName");
interfaceMethod = jobDataMap.getString("interfaceMethod");
}
/**
* 获取当前参数的类
*
* @return
*/
private Class getInterfaceClass() {
try {
return Class.forName(interfaceName);
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
return null;
}
/**
*
* @return
*/
private Method getInterfaceMethod() {
try {
return getInterfaceClass().getMethod(interfaceMethod);
} catch (SecurityException e) {
e.printStackTrace();
} catch (NoSuchMethodException e) {
e.printStackTrace();
}
return null;
}
}
- quartz-1.8.6.jar (438.6 KB)
- 下载次数: 3
- quartz-commonj-1.8.6.jar (3.6 KB)
- 下载次数: 1
发表评论
文章已被作者锁定,不允许评论。
相关推荐
Quart定时任务是一种基于Java的开源作业调度框架,它允许应用程序定义和执行重复的任务。Quartz的核心特性包括灵活的调度,支持多种触发器(如SimpleTrigger、CronTrigger)以及可扩展的工作(Job)。在本项目中,...
本资源主要探讨如何利用Spring Boot与Quart库相结合,实现动态的定时任务,并将定时任务信息存储到数据库中进行持久化。下面将详细阐述这一技术方案。 首先,Spring Boot是一个基于Java的微服务框架,提供了简化...
Spring框架与Quartz库的整合提供了强大的动态管理定时任务的能力。下面我们将深入探讨这个主题。 Spring框架是Java开发中的核心组件,它提供了一个全面的编程和配置模型,使得开发过程更加简洁高效。Spring通过其...
本篇文章将详细探讨如何在SpringBoot项目中整合Quartz,实现动态配置定时任务。 首先,我们需要在SpringBoot项目中引入Quartz的相关依赖。在`pom.xml`文件中添加以下Maven依赖: ```xml <groupId>org.spring...
标题中的“spring、Quart 源码”指的是Spring框架和Quartz库的源代码,这两个都是Java领域中用于构建应用程序的重要组件。Spring是全面的企业级应用开发框架,而Quartz则是一个强大的任务调度库。 Spring框架是Java...
在处理Quart-Z定时任务时,可能会遇到一个常见的问题:定时任务被意外执行了两次。此问题的出现通常与部署环境有关,尤其是当应用程序部署在Tomcat服务器上时更为显著。本文将根据提供的文档链接以及上下文信息,...
【标题】:“Quart 简单介绍” 在IT领域,Quartz是一个非常著名的开源作业调度框架,主要用于在Java应用程序中执行定时任务。它提供了一个全面且可高度定制化的调度解决方案,使得开发者可以方便地安排和执行周期性...
我们也可以通过Spring的`Scheduler`接口动态添加、修改或删除任务。 5. **日志和监控** 为了调试和监控任务的执行情况,通常会在Job中添加日志记录。同时,Quartz还提供了Web界面(如`Quartz Enterprise Scheduler...
最近单位需要开发一个定时自动报表服务,由于需求比较复杂,以前一直用的Timer就无法胜任了。经过几天的努力,终于做出来了。主要使用了以下3个组件: Quartz.3.0.7 定时功能主要靠它 Topshelf.4.2.1 把控制台程序转...
本示例讲解了如何利用Spring管理Quartz实现定时任务,无需在`web.xml`中配置,使定时任务的管理和监控更加方便。 首先,我们要理解Quartz的核心概念。Quartz是一个开源的作业调度框架,允许程序创建和管理作业以及...
【Quartz定时任务】是Java领域的一个强大任务调度框架,但在C#中也有相应的实现,如标题所示,这里讨论的是C#控制台应用中使用Quartz.NET进行定时任务的实现。Quartz.NET允许开发者在应用程序中安排任务在特定时间...
APScheduler是Python编程语言中的一款强大且灵活的定时任务库,它允许开发者安排任务在特定的时间点执行,或者按照一定的时间间隔重复执行。基于Quartz的设计理念,APScheduler提供了多种调度策略,包括基于日期、...
Quartz 是一个开源的作业调度框架,常用于Java应用程序中实现定时任务的管理。Spring框架则提供了对Quartz的集成,使得在Spring应用中配置和使用Quartz变得更加方便。本项目"quartzDaoImp.rar_quartz_spring定时_...
本文将深入探讨这两个框架以及如何结合使用它们实现定时存储功能。 首先,让我们了解一下 Spring 框架。Spring 是一个开源的 Java 应用程序框架,它提供了全面的编程和配置模型,用于简化 Java 应用开发。Spring 的...
在Java开发中,Spring框架与Quartz库的结合使用能够帮助开发者实现强大的定时任务功能。本文将详细解析“spring quartz定时任务demo”这个项目,它提供了实现Java定时任务的实例,便于快速理解和应用。 首先,...
在Java开发中,Spring框架与Quartz库的结合使用能够帮助开发者轻松地创建和管理定时任务。本示例将详细讲解如何通过XML配置文件来实现Spring与Quartz的集成,从而构建一个定时任务Demo。 首先,Quartz是开源的作业...
在提供的压缩包文件“prj_quart”中,我们可以预期找到与Spring 2.0定时任务相关的代码示例、配置文件或教程文档。这些资源可以帮助读者深入理解如何在Spring 2.0中配置和使用Quartz,以及如何编写和调度定时任务。...
【标题】"基于 springboot+mybatis_+shiro + redis+activiti+quarts+quart76.zip" 涵盖了多个关键的技术栈,这些技术在现代企业级应用开发中扮演着重要角色。下面将分别详细介绍这些技术及其在实际应用中的作用。 *...
在IT行业中,定时任务处理是不可或缺的一部分,尤其是在大数据和分布式计算领域。本篇文章将深入探讨“Storm Executor Task QuartzJob流式框架定时任务处理框架”,它结合了强大的Storm流处理系统和QuartzJob的...
它允许开发者创建、调度和执行作业,以实现定时任务或周期性任务的自动化。在项目中,Quartz可能用于计划和执行后台任务,如数据同步、报表生成等。 **7. Quart** 这里可能是打错了,正确应该是Quartz,因为"quarts...