=falseThen restart the application.Thanks to Spring Boot DevTools that makes Spring Boot development much more convenient. Disable LiveReload serverTo disable LiveReload server when your Spring Boot application is running, specify the following property in the application.properties file: In addition, changes to resources in the following directories also trigger a live reload: /META-INF/maven, /META-INF/resources, /resources, /static, /public, and /templates.Ĥ. When you save your files on your local machine they are auto-reloaded in the browser and you will see the change straight away. What will trigger a browser refresh?Any changes you made to a resource (Java code, HTML, properties file, etc) in the classpath will trigger a restart plus a browser refresh. is a tool that provides hot-reloading for HTML, CSS, and JS, running completely in the browser, eliminating the need for complex build tooling and Node.js command line. If not, you will see this error message: 3. When the extension connected to LiveReload server, the small circle at the center becomes a filled dot. Then you will see the LiveReload icon appears to the right of the address bar like this: You can click that icon to enable/disable LiveReload on a specific page in the browser. For example, I’m using Chrome so I got this: Click Add to Chrome. Install the browser extension for Chrome or Firefox and click on. Currently, it supports Safari, Chrome and Firefox. Package Installation Use Package Manager to install the LiveReload for Sublime Text package. Go to and click on the link that relates to your browser. Install LiveReload extension for your browser Start your Spring Boot application, and you will see LiveReload server is running by default: 2. If you are using Spring Tool Suite IDE, right-click on the project, then click Spring > Add DevTools. Install Spring Boot DevToolsSo, make sure that you have the following dependency in the Maven’s build file: Enjoy better Spring Boot development experience. Install LiveReload extension for your browser.Add the dependency spring-boot-devtools to your project’s build file ( pom.xml).For example, when you make some changes to a template file, the browser automatically refreshes the page uses that template – you see your changes take effect in action – no need to press F5 again and again – saving you a lot of time.In this post, you will learn to use LiveReload with Spring Boot DevTools to significantly reduce waiting time in developing Spring Boot projects – increase your productivity.Using LiveReload for auto-reload changes is pretty easy. In addition to automatic restart on changes feature, the Spring Boot DevTools module also comes with an embedded LiveReload server that can be used to trigger a browser refresh whenever a resource is changed.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |