![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Spring Study
左岸小鱼
工欲善其事,必先利其器
展开
-
spring2.0 quartz 静态定时任务
1.配置简单的spring 定时任务 配置文件中定义一个schedule的Factory <bean id="scheduler" class="org.springframework.scheduling.quartz.SchedulerFactoryBean"> <property name="triggers"> <list...原创 2009-10-09 10:56:55 · 140 阅读 · 0 评论 -
spring datasource 配置及事务管理
首先配置 datasource 我的数据源配置 来自于tomcat下 conf/context.xml 在这里你可以配置数据源信息 : context.xml 配置 <Resource name="jdbc/testDB" auth="Container" type="javax.sql.DataSource" maxActive="100" maxIdle...2009-10-10 10:12:27 · 65 阅读 · 0 评论 -
任务调度 Quartz 尽量做到可配置?
下面想总结下项目中完全只使用 任务调度Quartz来 组织定时任务 : 1.首先我们需要Quartz的jar包 ,见附件 2.我们来创建一个 ServletContextListener 实现这个接口的一个监听器,主要用来启动任务调度 public class SchedulerListener implements ServletContextListener { ...原创 2009-12-04 16:49:43 · 183 阅读 · 0 评论 -
在项目中获取Spring的Bean的几种方式
1. 方式一 通过Spring提供的工具类获取ApplicationContext对象 org.springframework.context.ApplicationContext ac2 = org.springframework.web.context.support.WebApplicationContextUtils.getWebApplicationContext(this.getS...原创 2009-12-17 17:52:41 · 322 阅读 · 0 评论