Skip to content

定时任务框架quartz与springboot结合,简单实现任务持久化、发布、删除、重试等操作

Notifications You must be signed in to change notification settings

mintrumpet/quartz-springboot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

quartz-springboot

quartz结合springboot,实现对quartz资源的管理,使用mysql作为数据源,做到对任务进行持久化处理,以及动态对任务进行编辑、更改、删除等操作。

解决spring-scheduled所带来的无法持久化的问题。

关键类

  • QuartzConfiguration:配置quartz相关bean,包括任务工厂、SpringBeanJobFactory等
  • TriggerFactory:用于处理trigger和job的实例化
  • CustomJob:自定义job,实现逻辑是通过传递的参数,找到对应spring bean,并且执行对应的方法(事务支持)

参考:https://tech.meituan.com/2014/08/31/mt-crm-quartz.html

About

定时任务框架quartz与springboot结合,简单实现任务持久化、发布、删除、重试等操作

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages