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
My workaround:
public static void main(String[] args) {
try {
SpringApplication.run(App.class, args);
} catch (Throwable e) {
if(e.getClass().getName().contains("SilentExitException")) {
LOGGER.debug("Spring is restarting the main thread - See spring-boot-devtools");
} else {
LOGGER.error("Application crashed!", e);
}
}
}
It doesn't matter that we ignore the SilentExitException
because the devtools are just restarting the instance with a SilentExitException
which isn't very silent. This try block will silence it...
I had to use text matching on the class as the SilentExitException
is private in SilentExitExceptionHandler
.
It doesn't solve your problem with the breakpoint...