LiveReload with IntelliJ
With LiveReload, you can make changes to your Spring Boot application while it is running, and the application will be reloaded…
LiveReload with IntelliJ
With LiveReload, you can make changes to your Spring Boot application while it is running, and the application will be reloaded automatically.
Step 1 — Update Dependencies for Live Reload
Include the spring-boot-devtools dependency in your project’s pom.xml (for Maven). This dependency enables automatic restarts and live reloading.
I did not want spring-boot-devtools to be available in the public space, as it exposes internals to outsiders. If you surround the dependency with the ‘profiles’ selector, it will only be loaded for the specific dependency. I put this block right after the closing </dependencies> in my pom file at the same level as <dependencies>. For example:
<profiles>
<profile>
<id>dev</id>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
</dependencies>
</profile>
</profiles>
Step 2 — Configure IntelliJ IDEA Settings
Enable automatic project build:
- Navigate to File > Settings (or IntelliJ IDEA > Preferences on macOS).
- Go to Build, Execution, Deployment > Compiler.
- Check the box for ‘Build project automatically’.
Allow auto-make when application is running
- Go to the top level Settings/Preferences for IntelliJ,
- Go to Compiler,
- In the section for Advanced Settings,
- Check the box for ‘Allow auto-make to start even if the developed application is currently running.’
Step 3 — Restart IntelliJ
Build and run the application
We want to build the application using the dev profile and enable the dev profile for use in the application.
mvn clean install -P dev
mvn spring-boot:run -Dspring-boot.run.profiles=dev
Step 4— Test it out
In my case:
- I added a logging statement to one of my endpoints.
- When I saved the file, the application was automatically rebuilt and deployed.
- Then, when I accessed the endpoint, I could see the updated logging information in the console.
메타데이터
- post_id
- 4cac4e3a3f5c
- slug
- livereload-with-intellij-4cac4e3a3f5c
- url
- https://medium.com/@dan_495/livereload-with-intellij-4cac4e3a3f5c
- canonical_url
- https://medium.com/@dan_495/livereload-with-intellij-4cac4e3a3f5c
- author_url
- https://medium.com/@dan_495
- status
- ok
- fetched_at
- 2026-08-17 08:16:58