Live Reload

    The restart is faster than a manual restart, as it uses a customized class loader that reloads only the application’s own classes. All Java code modifications are applied, including changes in the internal application logic, route modification (adding / removing / updating routes), and changes made to custom components ( subclasses). The session is also preserved during the restart.

    1. Run the application using (requires forking the JVM, which is the default mode) or via the Application class.

    2. Open the application in the browser, make some Java code changes, recompile, and the browser will refresh automatically.

    Show code

    Expand code

    1. spring.devtools.restart.poll-interval=2s

    Higher values improve stability at the cost of a higher-latency restart cycle.

    • The Vaadin client connects from the browser to the Spring Boot Live Reload server default port (35729). The port number to use cannot be changed in the client currently.