您的位置:首頁技術文章
文章詳情頁

Springboot整合quartz產生錯誤及解決方案

瀏覽:2日期:2023-05-14 18:40:41

1、spring boot整合quartz執行多個定時任務時報:

org.quartz.ObjectAlreadyExistsException: Unable to store Job : ’group1.job1’, because one already exists with this identification.

Springboot整合quartz產生錯誤及解決方案

定時任務雖然執行,但報了錯誤。第一次執行時沒有報錯誤,第二次及之后執行前會報這個錯誤,

解決辦法:

在初始化調度的時候clean一下: scheduler.clear();

Springboot整合quartz產生錯誤及解決方案

以上就是本文的全部內容,希望對大家的學習有所幫助,也希望大家多多支持好吧啦網。

標簽: Spring
相關文章:
国产综合久久一区二区三区