Existing support for LiveReload in Spring Boot depends on LiveReload browser extensions. There are several concerns related to that approach:
This project is a proof of concept for an improved LiveReload support in Spring Boot that doesn’t require usage of browser extensions. The approach taken in this PoC consists of:
-
LiveReload.js script served as a static resource
-
a Servlet filter (see
LiveReloadScriptInjectingFilter) that injects LiveReload.js script element into the head of an HTML document being served -
auto-configuration (see
LiveReloadScriptInjectingFilterAutoConfiguration) that sets up the filter if DevTools are enabled
All of the above are handled by poc-devtools, which depends on org.springframework.boot:spring-boot-devtools and pulls it in transitively, while poc-application is a simple Spring Boot application that utilizes the poc-devtools and can be used to showcase the improved LiveReload capabilities.
|
Note
|
This PoC targets Servlet-stack (Spring Web MVC) |
Related issues/PRs: