spring定时任务执行两次
<Host name="localhost" appBase="" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false"> <Context docBase="/usr/local/apache-tomcat-6.0.29/webapps/semwinner" path="" reloadable="true"></Context> <Context docBase="/usr/local/apache-tomcat-6.0.29/webapps/emarboxmanager" path="/admin" reloadable="true"></Context> </Host>
?把appBase设置为空即可!
去除了appBase="webapps"中的webapps变成了appBase="",因为web应用程序都是放在webapps这个目录下的,如果不把“webapps“去掉,这里会调用一次quartz的任务调度,在接下来的“<Context path”中又会调用一次quartz的任务调度,所以就重复了2次
1 楼 zx527291227 2012-09-18 你好!按照你的说我尝试了下但是还是会访问两次,能帮忙看下是什么问题么?