首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

spring定时任务施行两次

2012-11-09 
spring定时任务执行两次Host namelocalhostappBaseunpackWARstrue autoDeploytruexmlValidat

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   你好!按照你的说我尝试了下但是还是会访问两次,能帮忙看下是什么问题么?
http://zx527291227.iteye.com/admin/blogs/1680575

热点排行