自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(0)
  • 资源 (2)
  • 收藏
  • 关注

空空如也

spring定时器轻松搞定

java类代码: import org.quartz.JobExecutionException; import org.springframework.scheduling.quartz.QuartzJobBean; /** * 定时器 * @author Administrator * */ public class MapOutTime extends QuartzJobBean{ private TimesBiz biz; public void setBiz(TimesBiz biz) { this.biz = biz; } @Override protected void executeInternal(JobExecutionContext arg0) throws JobExecutionException { biz.run(); System.out.println("搞定");//---------------&gt; } } applicationContext.Xml中的配置: &lt;!-- 定时器 --&gt; <bean id="MapOutTime" class="org.springframework.scheduling.quartz.JobDetailBean"> <property name="jobClass" value="com.electricity.BIZ.MapOutTime"> </property> <property name="jobDataAsMap"> <map> <entry key="biz" value-ref="timesBiz"></entry> </map> </property> </bean> &lt;!-- 定时器启动方式 --&gt; <bean id="electriTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean"> <property name="jobDetail" ref="MapOutTime"></property> <property name="cronExpression"> <value>0 1,16,31,46 * * * ?</value> &lt;!--每天每时的1,16,31,46触发一次--&gt; </property> </bean> &lt;!-- 启动定时器--&gt; <bean id="electriList" class="org.springframework.scheduling.quartz.SchedulerFactoryBean"> <property name="triggers"> <list> <ref local="electriTrigger" /> </list> </property> </bean> 我用的spring.jar,有些低版本的Spring可能找不到.quartz.QuartzJobBean类, 另外加入一个quartz-all-1.6.0.jar包就OK

2013-02-20

spring security3.1.3 和 spring security3.0.0

spring security3.1.3 和 spring security3.0.0两个版本的源码以及jar 在dist文件夹里有jar文件,按自己项目需求选择

2012-11-15

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除