Spring boot hotswap with Intellij IDEA

2018-08-12

A solution that uses devTools works :

1. Adding devtools to your project

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-devtools</artifactId>
    <optional>true</optional>
</dependency>

2. Adding plugin to your pom.xml

<plugin>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-maven-plugin</artifactId>
    <configuration>
        <fork>true</fork>
        <addResources>true</addResources>
    </configuration>
</plugin>

3. Enabling automatic build

Open the Settings --> Build-Execution-Deployment --> Compiler and enable :
Build Project Automatically.

4. Update the value of

press ctrl+shift+Alt+/ and search for the registry. In the Registry, enable :

  • compiler.automake.allow.when.app.running

Hope it helps !

References :

Spring Boot Application Live Reload (Hot Swap) With Intellij IDEA
Spring boot hotswap with Intellij IDE
Spring Boot项目在IntelliJ IDEA中实现热部署(mac)
IntelliJ IDEA Spring Boot 项目添加热部署(Gradle) 

Comments
Write a Comment
  • 红鲤鱼与绿鲤鱼 reply

    没有目录的总是让我想往下翻

    • @红鲤鱼与绿鲤鱼 目录在最下方 “存档” 就可以看到啦