随笔分类 - spring
摘要:spring 定时器是spring3之后加入的,是quartz的简单实现 不需除spring额外的jar包 基于xml实现: 新建一个xml文件,applicationContext_task.xml 主要配置了定时任务的类com.jjwang.TestTask和方法task,cron配置定时的信息
阅读全文
摘要:使用idea在编写的类下右键Go->Test或者ctrl+shift+t,点击create new test会在相应目录下创建test类 别写代码如下 @RunWith(value = SpringJUnit4ClassRunner.class) @ContextConfiguration(loca
阅读全文

浙公网安备 33010602011771号