The problem is that spring boot creates another process for the application. You have to say that you want to debug the download, and not just run the command for maven or gradle in debug mode. :-( See:
Update: For my current project, I just provide a class to initialize the spring boot in a war file. (See Related instructions for using spring boot for military files that are deployed in real web containers).
So, during the development of frontend files, I use springboot: I launch it to quickly reload resources, etc., and to debug java code, I deploy the material to tomcat in debug mode. For release, I just have to decide what type of packaging I want, since my application can work as a jar or war file.
BTW: If you want to use tomcat only material (special filters, etc.), you can use the built-in tomcat for springboot: also run so that your environments are more similar and you do not hunt for phantom errors ;-)
Update 2
According to https://github.com/spring-projects/spring-boot/issues/1138 you can simply run the main method of your boot application for debugging. I think this helps to use the maven target at least once, so everything is compiled / copied, etc. This works for me! :-)
Update 3 In accordance with the spring boot command, they changed the way spring-boot: run works, so starting from 1.2 you can also use debug mode for the maven target, although they recommend starting spring to start, boot applications should always start the main method.
Update 4 I can confirm that starting in spring 1.2, you can directly run maven targets in debug mode to be able to set breakpoints, etc.
Patrick cornelissen
source share