JRebel is a commercial developer productivity tool for automatic, real-time update of Java code in the running application. Vaadin detects the JRebel Agent and automatically reloads the application in the browser after the Java changes have been hotpatched.
Set up and activate JRebel in your IDE by following the Quick Start guides available at https://www.jrebel.com/products/jrebel/learn. Use at least
2020.2.1version which contains built-in Live Reload integration.
Run or debug your Vaadin application using the JRebel Agent.
Navigate to your Vaadin application on the browser, make and save some changes, and the browser will reload automatically.
When using the Jetty Maven plugin together with JRebel, ensure automatic restart is disabled (omit or set
<scanIntervalSeconds>to a value of
Since the server does not restart, modifications to startup listeners and code that connects front-end and backend components, such as adding a new
LitTemplateclass, are not reflected. Modifications to routes are, however, picked up.
@PreserveOnRefresh, view instances are reused when reloaded in the browser; hence, hotpatched changes to the view constructor will not be reflected until the view is opened in another browser window or tab.