且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用gradle和jetty在调试模式下启用热交换?

更新时间:2023-01-15 14:39:45

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 ;)