spring-boot/spring-boot-project/spring-boot-devtools
Andy Wilkinson a95a7e3d40 Allow restart to be enabled when CL not named AppClassLoader
Previously, the restart initializer that enables restart when
-Dspring.devtools.restart.enabled=true is set had no effect when the
ClassLoader's name did not contain AppClassLoader. This commit updates
RestartApplicationListener to use the correct RestartInitializer when
the system property has forcibly enabled restart.

When restart is enabled a SilentExitException is thrown and it should be
caught and handled by the SilentExitExceptionHandler. When the
application is invoked via one of the loader's LauncherClasses
reflection is used and this exception becomes wrapped in an
InvocationTargetEception. Previously, this wrapping prevented
SilentExitExceptionHandler from handling the exception. This commit
updates the handler to look for an InvocationTargetException with a
SilentExitException target in addition to continuing to look for a
SilentExitException directly.

Fixes gh-24797
2021-01-13 10:12:12 +00:00
..
src Allow restart to be enabled when CL not named AppClassLoader 2021-01-13 10:12:12 +00:00
build.gradle Merge branch '2.3.x' 2020-08-11 14:34:27 +01:00