Home > front end >  How to enable Spring Boot Live Dev Tools on IntelliJ 2021.2 to rebuild classes after modifications a
How to enable Spring Boot Live Dev Tools on IntelliJ 2021.2 to rebuild classes after modifications a

Time:10-09

This is a tutorial on how to enable Dev Tools project on IntelliJ 2021.2 and observe the changes in code without having to restart the Tomcat server.

CodePudding user response:

In order to make it work, you need to:

1)Have devtools enable in maven or gradle. In maven it looks like :

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

2)In IntellijIDEA: go in settings(ctrl alt s) -> Build,Execution,Deployment -> compiler, check "Build project automatically"

3) Enable option 'allow auto-make to start even if developed application is currently running' in Settings -> Advanced Settings under compiler

enter image description here

You can now restart your intelliJ IDE and start your application.

  • Related