use of io.micronaut.runtime.event.ApplicationStartupEvent in project micronaut-core by micronaut-projects.
the class MessagingApplication method start.
@Override
public MessagingApplication start() {
ApplicationContext applicationContext = getApplicationContext();
if (applicationContext != null && !applicationContext.isRunning()) {
try {
applicationContext.start();
applicationContext.publishEvent(new ApplicationStartupEvent(this));
} catch (Throwable e) {
throw new ApplicationStartupException("Error starting messaging server: " + e.getMessage(), e);
}
}
return this;
}
Aggregations