|
|
|
@ -100,18 +100,22 @@ public class BackgroundPreinitializer implements ApplicationListener<SpringAppli
|
|
|
|
|
public void run() {
|
|
|
|
|
runSafely(new ConversionServiceInitializer());
|
|
|
|
|
runSafely(new ValidationInitializer());
|
|
|
|
|
runSafely(new MessageConverterInitializer());
|
|
|
|
|
if (!runSafely(new MessageConverterInitializer())) {
|
|
|
|
|
// If the MessageConverterInitializer we still might be able to
|
|
|
|
|
// initialize Jackson
|
|
|
|
|
runSafely(new JacksonInitializer());
|
|
|
|
|
}
|
|
|
|
|
runSafely(new CharsetInitializer());
|
|
|
|
|
preinitializationComplete.countDown();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void runSafely(Runnable runnable) {
|
|
|
|
|
boolean runSafely(Runnable runnable) {
|
|
|
|
|
try {
|
|
|
|
|
runnable.run();
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
catch (Throwable ex) {
|
|
|
|
|
// Ignore
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|