如何使用gradle和jetty在调试模式下启用热交换? [英] How to enable hot swapping in debug mode with gradle and jetty?

查看:126
本文介绍了如何使用gradle和jetty在调试模式下启用热交换?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用jettyRun来运行我的简单的spring应用程序。我想用Intellij debuger启用热插拔,但看起来像jetty并没有赶上变化。

http://docs.codehaus.org/display/GRADLE/Gradle+Jetty+Plugin 我看到它应该可以工作:

  jettyRun.scanIntervalSeconds = 1 

另一方面,有一些不一致。在gradle主页上未列出此参数: http://www.gradle.org/jetty_plugin 。无论如何,有没有什么办法可以在gradle上启用它?

解决方案

b
$ b

看起来这个参数根本不需要。无论如何,热部署都是可行的。



我只是无法看到,因为我的vaadin应用程序在F5之后仍保持会话。要正确地重新启动它,只需将?debug& restartApplication 添加到应用程序url即可。 因此, Ctrl + (?debug& restartApplication )的IntelliJ + F5 中的 Shift + F9 / p>

I'm using jettyRun for running my simple spring application. I wanted to enable hot swapping with Intellij debuger, but looks like jetty doesn't catch the changes.
On http://docs.codehaus.org/display/GRADLE/Gradle+Jetty+Plugin I seen that it should work with:

jettyRun.scanIntervalSeconds=1

On the other hand, there is some inconsistency. On the gradle homepage this parameter is not listed: http://www.gradle.org/jetty_plugin. Anyway, is there any way to enable this on gradle?

解决方案

Heh, actually found it myself now.

Looks like this parameter is not needed at all. Hot deploy works anyway.

I just wasn't able to seen that because my vaadin application was keeping session even after F5. To restart it properly it's enough to add ?debug&restartApplication to the application url.

So, Ctrl+Shift+F9 in IntelliJ + F5 in the browser (with ?debug&restartApplication) works fine ;)

这篇关于如何使用gradle和jetty在调试模式下启用热交换?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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