How to fix Spring Boot auto restart and live reload in IntelliJ IDEA
- Details
- Written by Nam Ha Minh
- Last Updated on 29 February 2020   |   Print Email
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <scope>runtime</scope> <optional>true</optional> </dependency>Then restart your Spring Boot application. In Eclipse or Spring Tool Suite, the automatic restart feature works immediately when you press Ctrl + S to save changes in the code.However, in IntelliJ IDEA, you have to press Ctrl + F9 (Build Project) to trigger hot restart of the application. This is quite inconvenient but a hot-swap restart is much faster than a cold, full restart. You also notice that the browser does not refresh automatically.To fix the problem and let IntelliJ IDEA triggers Spring Boot DevTools restarts the application really automatically, you need to do 2 extra steps.First, enable Build project automatically in the Settings dialog. Click menu File Settings > Build, Execution, Deployment > Compiler as shown below:


compiler.automake.allow.when.app.running
And check to enable it:
- Spring Boot automatic restart using Spring Boot DevTools
- Spring Boot auto reload changes using LiveReload and DevTools
Other Spring Boot Tutorials:
- Spring Boot Hello World Example
- Spring Boot Form Handling Tutorial with Spring Form Tags and JSP
- Spring Boot Hello World RESTful Web Services Tutorial
- How to create a Spring Boot Web Application (Spring MVC with JSP/ThymeLeaf)
- Spring Boot - Spring Data JPA - MySQL Example
- Spring Boot CRUD Example with Spring MVC – Spring Data JPA – ThymeLeaf - Hibernate - MySQL
- How to use JDBC with Spring Boot
- Spring Boot CRUD Web Application with JDBC - Thymeleaf - Oracle
- Spring Boot RESTful CRUD API Examples with MySQL database
- How to package Spring Boot application to JAR and WAR
About the Author:

Comments