Vaadin 14.3 ships with a new Live Reload feature that lets you see your UI changes in the browser without a manual refresh. It is automatically enabled in development mode and does not require any browser plugins. Read on to get started with Live Reload with JRebel, HotswapAgent, or Spring Boot dev tools.
What is Live Reload?
How to enable Live Reload
Live Reload handles the browser window refresh, but you still need something to reload Java code changes. We have documented installation steps for three alternatives that take care of this: JRebel, HotswapAgent and Spring Boot DevTools.
Live Reload with JRebel
JRebel is a commercial plugin for the Java virtual machine for instantly reloading code changes. If you are a JRebel user, follow the installation instructions in our documentation. There is a free trial available for the plugin at jrebel.com. JRebel is not a specific JVM implementation and works with all Vaadin applications, regardless of whether you use Spring, CDI or plain Java servlet.
Live Reload with HotswapAgent
HotswapAgent is a plugin system to allow frameworks to implement special reloading mechanisms after class redefinition. The latest version of HotswapAgent ships with a plugin for Vaadin 14. HotswapAgent works with DCEVM (a special JVM with an enhanced version of HotSwap). Follow the instructions in our documentation to set up Trava OpenJDK and Live Reload.
Live Reload with Spring Boot DevTools
Spring Boot DevTools monitor classpath resources and automatically restart your application whenever you make a change. Although the restart is not as fast as a hot reload, it’s still typically faster than a “cold restart”. Read more about Spring Boot DevTools and follow the instructions in our documentation to setup Live Reload.
The new Live Reload feature (that requires no browser plugin) is available in Vaadin 14.3 and will also be available in September in Vaadin 17. See what else is new in Vaadin 14.3 on the release page.