简体   繁体   English

避免在Eclipse中发布资源后服务器重启?

[英]Avoid Server restart after publishing resource in eclipse?

i am using eclipse server to the publish my web application to my local tomcat server.Whenever i modify java or non java resource, it gets published to server(as i have selected automatically publish when resource change).But problem is as soon as resource is published, server gets restarted which i want to avoid as it takes ample amount of time. 我正在使用eclipse服务器将Web应用程序发布到本地tomcat服务器。每当我修改Java或非Java资源时,它都会发布到服务器上(因为我选择了在资源更改时自动发布)。发布后,服务器要重新启动,我要避免,因为它需要足够的时间。 How to avoid server restart ? 如何避免服务器重启?

I think you are looking for hot deployment? 我认为您正在寻找热部署?

Heres a good tutorial I seen a while ago http://www.mkyong.com/eclipse/how-to-configure-hot-deploy-in-eclipse/ 这是我前一段时间看过的优秀教程http://www.mkyong.com/eclipse/how-to-configure-hot-deploy-in-eclipse/

Whenever you change your code , Automatically eclipse detect your source has modified, and start redeploying your actual code into server . 每当您更改代码时 ,eclipse 都会自动检测到您的源代码已被修改,并开始将实际代码重新部署到server中 So that Tomcat server is restarting in a particular time interval. 这样,Tomcat服务器将在特定时间间隔内重新启动。

You can configure tomcat for reload automatically, configure the attribute reloadable to true of the Context. 您可以将tomcat配置为自动重新加载,将Context的reloadable属性配置为true。

For do Tomcat 7 you must do. 为此,必须执行Tomcat 7。

Edit CATALINA_HOME/conf/context.xml Change: 编辑CATALINA_HOME / conf / context.xml更改:

<Context>

For: 对于:

<Context reloadable="true">

Where CATALINA_HOME is your tomcat installation. 其中CATALINA_HOME是您的tomcat安装。

clicks on the “ Module ” view, make sure “ Auto Reload ” is “ Disabled “. 单击“ Module ”视图,确保“ Auto Reload ”为“ Disabled ”。 Default is enabled. 默认启用。 It will stop the auto restart. 它将停止自动重启。

To do it in one go for all modules 一站式完成所有模块

In server options, uncheck option Modules auto reload by default 在服务器选项中,取消选中Modules auto reload by default选项

Also have a look at Stop Eclipse restarting my web app on file save 还可以查看Stop Eclipse在文件保存时重启我的Web应用程序

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM