关于tomcat 热部署

2019-08-08  本文已影响0人  笨小孩1234

最近因为一个项目,部署到tomcat9 内存无限增大,换回了tomcat8 就好了。不知道什么原因,但是热部署不能用

pom里面也是默认的。后来查阅资料才知道需要在tomcat配置文件context.xml里面配置

<Context reloadable="true">

    <!-- Default set of monitored resources. If one of these changes, the    -->

    <!-- web application will be reloaded.                                  -->

    <WatchedResource>WEB-INF/web.xml</WatchedResource>

    <WatchedResource>WEB-INF/tomcat-web.xml</WatchedResource>

    <WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>

    <!-- Uncomment this to disable session persistence across Tomcat restarts -->

    <!--

    <Manager pathname="" />

    -->

</Context>

只需要 在context 里面 加上这么一句话 reloadable="true" 上传的一个class 就可以自动部署了

上一篇 下一篇

猜你喜欢

热点阅读