每次进行更改时都必须重新启动tomcat [英] Having to restart tomcat whenever you make a change
本文介绍了每次进行更改时都必须重新启动tomcat的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
每次在java代码中进行小的更改时,是否有办法重新启动tomcat?
Is there a way around having to restart tomcat every time a small change is made in java code?
推荐答案
设置< <$的code> reloadable 属性 context.xml中的c $ c>< Context>
元素到 true
。
<Context reloadable="true">
然后Tomcat将监控 / WEB-INF / classes $中的变化c $ c>和
/ WEB-INF / lib
并在适当的时候重新加载。
Then Tomcat will monitor changes in /WEB-INF/classes
and /WEB-INF/lib
and reload whenever appropriate.
如果您使用的是IDE,那么它也可以配置为服务器设置。以下是Eclipse中的样子:
If you're using an IDE, this is configureable as server setting as well. Here's how it look like in Eclipse:
这篇关于每次进行更改时都必须重新启动tomcat的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文