From 182adaa7b60255cca70a2cd9bc2e7a6f742590c6 Mon Sep 17 00:00:00 2001 From: anhefti Date: Tue, 9 Jun 2020 14:44:29 +0200 Subject: [PATCH] fixed GUI service dependencies (to WebserviceInfo) --- .../java/ch/ethz/seb/sebserver/SEBServerInit.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/ch/ethz/seb/sebserver/SEBServerInit.java b/src/main/java/ch/ethz/seb/sebserver/SEBServerInit.java index d4d56a10..8a704889 100644 --- a/src/main/java/ch/ethz/seb/sebserver/SEBServerInit.java +++ b/src/main/java/ch/ethz/seb/sebserver/SEBServerInit.java @@ -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; } } - }