用quartz 执行定时任务时,会执行2次,具体原因不详
先把定时的代码放到一个单独的配置文件中,然后在web.xml文件中加载这个定时的配置文件。
contextConfigLocation
classpath*:/applicationContext.xml,classpath*:/schedule.xml
我的定时配置文件:schedule.xml
原博客:
[url]http://blog.sina.com.cn/s/blog_9ed9ac7d0101f4eb.html[/url]
附件是自己 项目的解决方法
先把定时的代码放到一个单独的配置文件中,然后在web.xml文件中加载这个定时的配置文件。
contextConfigLocation
classpath*:/applicationContext.xml,classpath*:/schedule.xml
我的定时配置文件:schedule.xml
原博客:
[url]http://blog.sina.com.cn/s/blog_9ed9ac7d0101f4eb.html[/url]
附件是自己 项目的解决方法