in iep-spring/src/main/java/com/netflix/iep/spring/Main.java [55:81]
void runImpl(String[] args) throws Exception {
// Send uncaught exceptions to the expected logger. Register early as errors
// could get generated during startup.
Thread.setDefaultUncaughtExceptionHandler((thread, e) ->
LOGGER.error("Uncaught exception from thread {} ({})", thread.getName(), thread.getId(), e)
);
try {
// Binding for command line arguments
context.registerBean(Args.class, () -> Args.from(args));
context.refresh();
// Start up
context.start();
context.registerShutdownHook();
// Make sure service manager is created
context.getBean(ServiceManager.class);
LOGGER.info("service started successfully");
} catch (Throwable t) {
LOGGER.error("service failed, shutting down", t);
if (exitOnFailure()) {
System.exit(1);
}
throw t;
}
}