Fix check for using CoordinatedRestoreAtCheckpointStartup
Closes gh-38186
This commit is contained in:
parent
4d0b50e967
commit
9eda564d06
|
@ -1684,8 +1684,10 @@ public class SpringApplication {
|
|||
}
|
||||
|
||||
static Startup create() {
|
||||
return (!ClassUtils.isPresent("jdk.crac.management.CRaCMXBean", Startup.class.getClassLoader()))
|
||||
? new StandardStartup() : new CoordinatedRestoreAtCheckpointStartup();
|
||||
ClassLoader classLoader = Startup.class.getClassLoader();
|
||||
return (ClassUtils.isPresent("jdk.crac.management.CRaCMXBean", classLoader)
|
||||
&& ClassUtils.isPresent("org.crac.management.CRaCMXBean", classLoader))
|
||||
? new CoordinatedRestoreAtCheckpointStartup() : new StandardStartup();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue