seb-server/src/main/java/ch/ethz/seb/sebserver/gui/GuiInit.java

42 lines
1.3 KiB
Java
Raw Normal View History

2019-12-09 12:06:14 +01:00
/*
* Copyright (c) 2019 ETH Zürich, Educational Development and Technology (LET)
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
package ch.ethz.seb.sebserver.gui;
import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;
2019-12-12 19:47:20 +01:00
import ch.ethz.seb.sebserver.SEBServerInit;
2019-12-09 12:06:14 +01:00
import ch.ethz.seb.sebserver.gbl.profile.GuiProfile;
@Component
@GuiProfile
public class GuiInit implements ApplicationListener<ApplicationReadyEvent> {
2019-12-12 19:47:20 +01:00
private final SEBServerInit sebServerInit;
protected GuiInit(final SEBServerInit sebServerInit) {
this.sebServerInit = sebServerInit;
}
2019-12-09 12:06:14 +01:00
@Override
public void onApplicationEvent(final ApplicationReadyEvent event) {
2019-12-12 19:47:20 +01:00
this.sebServerInit.init();
SEBServerInit.INIT_LOGGER.info("---->");
SEBServerInit.INIT_LOGGER.info("----> **** GUI Service starting up... ****");
2019-12-11 11:15:35 +01:00
SEBServerInit.INIT_LOGGER.info("---->");
SEBServerInit.INIT_LOGGER.info("----> GUI Service sucessfully successfully started up!");
SEBServerInit.INIT_LOGGER.info("---->");
2019-12-09 12:06:14 +01:00
}
}