I encountered this problem when working on a project today, here is a note! ! !
The Debug mode of the project started successfully, and the breakpoint found that there was no red hook in the red dot, which caused the breakpoint to fail!
solution:
- Check whether the Controller class is annotated with @Controller
- Press Ctrl+F9 to recompile
- When SpringBoot starts, it does not scan the package where the Controller is located, as shown in the figure below ( this method is a solution to my problems )