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