use of com.manydesigns.portofino.persistence.Persistence in project Portofino by ManyDesigns.
the class DatabaseModule method onApplicationEvent.
@Override
public void onApplicationEvent(@NotNull ContextRefreshedEvent event) {
Persistence persistence = applicationContext.getBean(Persistence.class);
Persistence.Status status = persistence.status.getValue();
if (status == null || status == Persistence.Status.STOPPED) {
logger.info("Starting persistence...");
persistence.start();
this.status = ModuleStatus.STARTED;
logger.info("Persistence started.");
}
}
Aggregations