use of net.nemerosa.ontrack.repository.support.DBInitConfig in project ontrack by nemerosa.
the class DBStartup method init.
/**
* Runs all database configurations and runs each {@link StartupService} in turn.
*/
@PostConstruct
public void init() {
logger.info("[db] DB initialisation.");
for (DBInitConfig dbInitConfig : dbInitConfigs) {
logger.info("[db] DB initialisation for \"{}\"", dbInitConfig.getName());
DBInit dbInit = dbInitConfig.createConfig();
dbInit.run();
}
logger.info("[startup] Running startup services");
for (StartupService startupService : startupServices) {
logger.info("[startup] Starting service \"{}\"", startupService.getName());
startupService.start();
}
}
Aggregations