Spring Scheduled 作业执行两次

本地执行没有出现,放到服务器部署就出现,原因在于tomcat的server.xml配置上

  <Host name="localhost"  appBase=""
            unpackWARs="true" autoDeploy="true">
      <Context path=""  docBase="webapps/xxx" />
      
        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
               prefix="localhost_access_log" suffix=".txt"
               pattern="%h %l %u %t &quot;%r&quot; %s %b" />

      </Host>

appBase 改为 ""  且 docBase="webapps/项目名称"

猜你喜欢

转载自blog.csdn.net/hnfeitianwugui/article/details/84314386
今日推荐