Issue with Spring-Boot-Devtools compatibility with Intellij IDEA, compiltion error on Spring-Boot-Devtools live-reload

by TheCoder   Last Updated September 11, 2019 17:26 PM

I am facing hard time in the live reload using Spring-Boot-Devtools. Every time I update my controller class, the spring couldn't find the dependencies which are injected using constructor injection.

Suppose I am having this class

class MyController{

  private MyService myService;

  public MyController(MyService myService){    
    this.myService= myService;
  }   

  //controller methods

}

Changes to any of the controller methods or the MyService's methods would result in some error like: constructor in com.example.MyController required a bean of type 'com.example.MyService' that could not be found

Whereas if I run the same code on the Eclipse, the live reload works fine.

IntelliJ IDEA 2019.1.2 (Ultimate Edition)
JRE: 1.8.0_202-release-1483-b49 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.13.6

gradle enter image description here



Related Questions


Updated May 20, 2018 11:26 AM

Updated July 09, 2018 00:26 AM

Updated September 22, 2018 03:26 AM

Updated July 09, 2017 18:26 PM