在jfinal项目中使用定时任务quartz如果自行得到 DataSource 或 Connection ,后台会一直抛异常:
com.jfinal.plugin.activerecord.ActiveRecordException: com.alibaba.druid.pool.DataSourceClosedException: dataSource already closed at Tue Sep 19 18:00:27 CST 2017
at com.jfinal.plugin.activerecord.DbPro.find(DbPro.java:315)
at com.jfinal.plugin.activerecord.DbPro.find(DbPro.java:326)
at com.jfinal.plugin.activerecord.Db.find(Db.java:233)
at com.sxjlrj.sys.model.ExpertMailModel.ge
4000
tMail(ExpertMailModel.java:22)
at com.sxjlrj.timmer.SendMsgForPersonTimmer.execute(SendMsgForPersonTimmer.java:39)
at org.quartz.core.JobRunShell.run(JobRunShell.java:206)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:548)
Caused by: com.alibaba.druid.pool.DataSourceClosedException: dataSource already closed at Tue Sep 19 18:00:27 CST 2017
at com.alibaba.druid