“重新部署”之间的区别是什么?和“重新启动服务器”在IntelliJ? [英] What is the difference between "Redeploy" and "Restart Server" in IntelliJ?

查看:2323
本文介绍了“重新部署”之间的区别是什么?和“重新启动服务器”在IntelliJ?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用IntelliJ和Tomcat 6来运行Spring Java EE应用程序。我没有部署已编译的战争,而是选择使用爆炸的战争部署,从而让我可以选择热交换某些类和JSP。

I'm using IntelliJ with Tomcat 6 to run a Spring Java EE application. Rather than deploying the compiled war, I have opted to use the exploded war deployment, thus giving me the option to hotswap some classes and JSPs.

但是,除了更新类和更新类和资源之外,IntelliJ还允许用户在更新操作上重新部署和重新启动服务器。这两个选择有什么区别?

However, aside from the "Update Classes" and "Update Classes and Resources", IntelliJ also allows users to "Redeploy" and "Restart Server" on an update action. What is the difference between these two choices?

如果我在班级中对我的方法签名进行了更改,或者我在Springconfig.xml中进行了更改,是否需要重新启动服务器,或者是重新部署足够吗?我注意到我无法简单地热切换其功能签名或与其关联的注释已被修改的类。

If I make a change to my method signatures in my class, or if I make a change in my Springconfig.xml, do I need to restart the server, or is a redeploy sufficient? I've noticed that I am unable to simply hotswap classes whose function signatures or annotations associated with them have been modified.

推荐答案

重启服务器完全按照它的说法完成,并重新启动tomcat服务器。您的战争将在服务器启动时重建和部署。如果您在热插拔类时遇到问题,这很有用。

Restart server does exactly what it says, and restarts the tomcat server. Your war will be rebuilt and deployed at server startup. This is useful if you are having trouble hot-swapping your classes.

重新部署将重新部署整个.war(无需重新启动服务器),而不是尝试热 - 删除更改​​的课程和其他资源。

Redeploy will redeploy the entire .war (without restarting the the server), as opposed to trying to hot-swap out changed classes and other resources.

参见:
http://www.jetbrains.com/idea/webhelp/updating-a-running-java-ee-application.html

在回答第二个问题时,重新部署应该足够了。也就是说,它可能导致内存泄漏,并且通常只比完全重启快一点。

In answer to your second question, a redeploy should be sufficient. That said, it can cause memory leaks and is often only slightly faster than a full restart.

这篇关于“重新部署”之间的区别是什么?和“重新启动服务器”在IntelliJ?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆