How to enable hot swapping in debug mode with gradle and jetty?

与世无争的帅哥 提交于 2020-01-01 15:31:37

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/8282568/how-to-enable-hot-swapping-in-debug-mode-with-gradle-and-jetty

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!