fixed GUI service dependencies (to WebserviceInfo)
This commit is contained in:
parent
8e7cb416ae
commit
182adaa7b6
1 changed files with 7 additions and 7 deletions
|
@ -12,12 +12,11 @@ import java.util.Arrays;
|
|||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.core.env.Environment;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import ch.ethz.seb.sebserver.webservice.WebserviceInfo;
|
||||
|
||||
@Lazy
|
||||
@Component
|
||||
public class SEBServerInit {
|
||||
|
@ -25,13 +24,15 @@ public class SEBServerInit {
|
|||
public static final Logger INIT_LOGGER = LoggerFactory.getLogger("ch.ethz.seb.SEB_SERVER_INIT");
|
||||
|
||||
private final Environment environment;
|
||||
private final WebserviceInfo webserviceInfo;
|
||||
private final String version;
|
||||
|
||||
private boolean initialized = false;
|
||||
|
||||
protected SEBServerInit(final Environment environment, final WebserviceInfo webserviceInfo) {
|
||||
protected SEBServerInit(
|
||||
final Environment environment,
|
||||
@Value("${sebserver.version}") final String version) {
|
||||
this.environment = environment;
|
||||
this.webserviceInfo = webserviceInfo;
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public void init() {
|
||||
|
@ -43,7 +44,7 @@ public class SEBServerInit {
|
|||
INIT_LOGGER.info("----> |___/|___||___/ |___/\\___||_| \\_/ \\___||_| ");
|
||||
INIT_LOGGER.info("---->");
|
||||
INIT_LOGGER.info("---->");
|
||||
INIT_LOGGER.info("----> Version: {}", this.webserviceInfo.getSEBServerVersion());
|
||||
INIT_LOGGER.info("----> Version: {}", this.version);
|
||||
INIT_LOGGER.info("---->");
|
||||
INIT_LOGGER.info("----> Active profiles: {}", Arrays.toString(this.environment.getActiveProfiles()));
|
||||
INIT_LOGGER.info("---->");
|
||||
|
@ -51,5 +52,4 @@ public class SEBServerInit {
|
|||
this.initialized = true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue