Breakpoint at “throw new SilentExitException()” in Eclipse + Spring Boot

前端 未结 5 873
Happy的楠姐
Happy的楠姐 2021-01-30 19:35

Every time I run my Spring Boot project on debug mode in Eclipse IDE (Spring Tool Suite), the thread stops at throw new SilentExitException(); line even without a b

5条回答
  •  情话喂你
    2021-01-30 20:08

    As Eclipse on Debug mode already allows limited hotpatching, I find the reloader to be counterproductive most of the time and so I decided to disable it by:

    System.setProperty("spring.devtools.restart.enabled", "false");
    

    Reference: https://docs.spring.io/spring-boot/docs/current/reference/html/using-boot-devtools.html#using-boot-devtools-restart-disable

    Since that exception is thrown by the reloader, this also solves this issue. Note that you'll have to use the System.setProperty method instead of setting it in application.properties.

提交回复
热议问题