Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable Spring Boot Live Dev Tools on IntelliJ 2021.2 to rebuild classes after modifications and deploy changes to server?

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.

like image 762
Pawan.Java Avatar asked Dec 06 '25 06:12

Pawan.Java


2 Answers

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>
  1. In IntelliJ IDEA: go to settings(ctrl + alt + s) -> Build, Execution, Deployment -> Compiler, check "Build project automatically"

  2. Enable option "Allow auto-make to start even if developed application is currently running" in Settings -> Advanced Settings under "Compiler"

check Allow auto-make to start even if developed application is currently running under Advanced Settings

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

like image 144
Pawan.Java Avatar answered Dec 07 '25 21:12

Pawan.Java


1.file->settings->Build,Execution,Deployment->compiler->click->Build project automatically->apply->ok

2.

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

3.file->settings->advance option->allow auto make start even if developed application in currently running->apply->ok

4.restart IDE

like image 37
tricks. com Avatar answered Dec 07 '25 22:12

tricks. com



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!