<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
   http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
   http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
   http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<!-- 任务调度配置 --> <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~作业配置~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<bean id="quartzJob" class="com.spring.quartz.SendMailJob"></bean> <!-- ~~~~~~~~~~~~~~~~~~~~~~~JobDetail配置~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<bean id="jobDetail"
class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<!-- 针对作业 -->
<property name="targetObject" ref="quartzJob" />
<property name="targetMethod" value="doSomeThing" />
<property name="concurrent" value="false"/>
</bean> <!-- ~~~~~~~~~~~~~~~~ 触发器配置Trigger ~~~~~~~~~~~~~~~ -->
<!-- 采用Cron Trigger -->
<bean id="cronTrigger"
class="org.springframework.scheduling.quartz.CronTriggerBean">
<property name="jobDetail">
<ref bean="jobDetail" />
</property>
<!-- cron表达式 -->
<property name="cronExpression">
<value>0/1 * * ? * *</value>
</property>
</bean>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~Scheduler 调控程序~~~~~~~~~~~~~~~~~~~~~-->
<bean id="start_common"
class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref bean="cronTrigger" />
</list>
</property>
</bean>
</beans>这是我spring配置文件,但是呢启动之后Job不自动运行package com.spring.quartz;import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;public class SendMailJob { private static Log log = LogFactory.getLog(SendMailJob.class); public void doSomeThing(){ //JobDetail jobDetail = context.getJobDetail(); log.info("~~~~~~~开始Execute Job: " +"" + "~~~~~~~");


log.info("~~~~~~~~~~~~~~~~~~~~事情办完了~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
}}这是job代码!
谁帮帮忙!