Hot Deploy & Live Reload
JRebel is a commercial, developer productivity tool for automatic, real-time update of Java code in running applications. Vaadin detects the JRebel Agent and reloads the application in the browser after Java changes have been hotpatched.
Basic Set-Up
First, set up and activate JRebel in your IDE by following the Quick Start guides on JRebel’s site. Use at least version 2020.2.1
of JRebel. It contains live reload integration.
Then run or debug a Vaadin application using the JRebel Agent. Navigate to your Vaadin application in the browser, make some changes and save them. You’ll then see that the browser reloads automatically.
When using the Jetty Maven plugin together with JRebel, make sure that automatic restart is disabled by omitting or setting <scanIntervalSeconds>
to a value of 0
or less.
Startup Delays
To reduce the startup time when using JRebel in debug mode in IntelliJ IDE, disable the Reactive Debugger.
To do this, navigate to
. Once there, uncheck the "Enable Reactor Debug mode" checkbox.Current Limitations
Since the server isn’t restarted, modifications to startup listeners and code that connect frontend and backend components (e.g., adding a new LitTemplate
class) aren’t reflected. However, modifications to routes are picked up.
With @PreserveOnRefresh
, view instances are reused when reloaded in the browser. Hence, hotpatched changes to the view constructor aren’t reflected until the view is opened in another browser window or tab.
A76EF15A-322B-471B-B803-169F4E7920B1