摘要: http://yefriendly.iteye.com/blog/404389 续Spring中使用Quartz(一)注意:CronTriggerBean的cronExpression属性指定格式:至少6个时间元素,上面表示每天的15:37-38分执行1次任务。时间元素(按照顺序):秒(0-59):分(0-59):小时(0-23):每月第几天(1-31):月(1-12或JAN-DEC):每星期第几天(1-7或SUN-SAT):年(1970-2099):其中:不用设置的用”?”.(1)每月第几天和每星期第几天是互斥的,两个只能设置1个。如果有好几个时间点,可以使用”,”符号,... 阅读全文
posted @ 2012-08-20 19:01 balaamwe 阅读(259) 评论(0) 推荐(0) 编辑
摘要: http://yefriendly.iteye.com/blog/404374 Quartz使用开发环境:Spring2.0。如果包类没有Quartz包,则需要加入到类路径。A:extends QuartzJobBean方法1:定义任务(extendsQuartzJobBean)创建一个Job:packageonlyfun.bb.Quartz;importorg.quartz.JobExecutionContext;importorg.springframework.scheduling.quartz.QuartzJobBean;publicclassQuartzDemoext... 阅读全文
posted @ 2012-08-20 18:59 balaamwe 阅读(430) 评论(0) 推荐(0) 编辑
摘要: http://hi.baidu.com/sword0228/item/bd33e5997f2a9bdd7b7f0196private static Gson gson = new GsonBuilder().registerTypeAdapter(Date.class,new UtilDateSerializer()).registerTypeAdapter(Calendar.class,new UtilCalendarSerializer()).registerTypeAdapter(GregorianCalendar.class,new UtilCalendarSerializer()). 阅读全文
posted @ 2012-08-20 14:36 balaamwe 阅读(2046) 评论(0) 推荐(0) 编辑