← Back to list

LiveReload with IntelliJ

With LiveReload, you can make changes to your Spring Boot application while it is running, and the application will be reloaded…

Dan Toomey · 2025-12-01 18:40 · 1 claps · 1.1 min read paywalled
#intellij #livereload
Open on Medium ↗
Wiki topics: 🏃 · Running & Endurance

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:

  1. Navigate to File > Settings (or IntelliJ IDEA > Preferences on macOS).
  2. Go to Build, Execution, Deployment > Compiler.
  3. Check the box for ‘Build project automatically’.

Allow auto-make when application is running

  1. Go to the top level Settings/Preferences for IntelliJ,
  2. Go to Compiler,
  3. In the section for Advanced Settings,
  4. 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