Tomcat 自动reload

打开 Tomcat安装目录的conf文件夹下的 context.xml:

<!-- The contents of this file will be loaded for each web application -->
<Context reloadable="true">

<!-- Default set of monitored resources -->
<WatchedResource>WEB-INF/web.xml</WatchedResource>

<!-- Uncomment this to disable session persistence across Tomcat restarts -->
<!--
<Manager pathname="" />
-->

<!-- Uncomment this to enable Comet connection tacking (provides events
on session expiration as well as webapp lifecycle) -->
<!--
<Valve className="org.apache.catalina.valves.CometConnectionManagerValve" />
-->

</Context>

把红色部分加上就OK了!!

原文地址:https://www.cnblogs.com/huapox/p/3172502.html