我配置了一个Quartz作业,该作业在Spring自带的eclipse的Debug Tomcat中触发。但是,如果我将我的应用程序部署到单独的Tomcat安装中,则作业不会启动。Java - 在Debug Tomcat上工作的Quartz Job,但不在单独的Tomcat上
这里是我的石英-config.xml中:
<?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:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd">
<context:component-scan base-package="de.java.scheduling" />
<bean name="issueSyncJobDetail" class="org.springframework.scheduling.quartz.JobDetailFactoryBean">
<property name="jobClass" value="de.java.scheduling.IssueSyncJob" />
<property name="durability" value="true" />
</bean>
<bean id="cronTrigger" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
<property name="jobDetail" ref="issueSyncJobDetail" />
<property name="cronExpression" value="0/10 * * ? * MON-FRI" />
</bean>
<!-- Scheduler factory bean to glue together jobDetails and triggers to Configure Quartz Scheduler -->
<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="jobDetails">
<list>
<ref bean="issueSyncJobDetail" />
</list>
</property>
<property name="triggers">
<list>
<ref bean="cronTrigger" />
</list>
</property>
</bean>
任何想法,可能是不触发一次部署在Tomcat的我工作的原因是什么?
似乎有在你的XML没有搞错广泛的答案,可以给您提供更信息,另一种选择,我犯了一个像你的错误,我在我的Eclipse中的tomcat调试,然后我将它打包成一个战争文件,然后把它放到我的webapps文件夹,然后用Eclipse启动tomcat,显然它没有工作,所以有你犯了一个像我这样的错误? – Wangbo
为什么它不适合你在独立的Tomcat上?什么是错误? – SpaceJump