From fe3273278bb24349db8516c0c9e315cba40a58bd Mon Sep 17 00:00:00 2001 From: Lukas Date: Wed, 9 Jun 2021 17:28:02 +0200 Subject: [PATCH] :poop: dirty fix to make docker build run --- server/src/main/java/amosproj/server/Config.java | 9 +++++++-- server/src/main/java/amosproj/server/GitLab.java | 3 ++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/server/src/main/java/amosproj/server/Config.java b/server/src/main/java/amosproj/server/Config.java index 65f10cd..7e8bf97 100644 --- a/server/src/main/java/amosproj/server/Config.java +++ b/server/src/main/java/amosproj/server/Config.java @@ -14,9 +14,14 @@ @Service public class Config { - private static String configFile; + private static String configFile = "/home/amos/config.json"; // FIXME default value da sonst nicht in docker läuft. - public Config(@Value("${CONFIG_FILE}") String CONFIG_FILE) { + /*public Config(@Value("${CONFIG_FILE}") String CONFIG_FILE) { + configFile = CONFIG_FILE; + }*/ + + @Value("${CONFIG_FILE}") + public void setConfigFile(String CONFIG_FILE) { configFile = CONFIG_FILE; } diff --git a/server/src/main/java/amosproj/server/GitLab.java b/server/src/main/java/amosproj/server/GitLab.java index 153d840..d82daf3 100644 --- a/server/src/main/java/amosproj/server/GitLab.java +++ b/server/src/main/java/amosproj/server/GitLab.java @@ -25,11 +25,12 @@ public class GitLab { private String apitoken; - private String gitlabHost = Config.getConfigNode().get("settings").get("gitLabHost").asText(); + private String gitlabHost; private final org.gitlab4j.api.GitLabApi api; public GitLab(@Value("${GITLAB_ACCESS_TOKEN}") String token) { + this.gitlabHost = Config.getConfigNode().get("settings").get("gitLabHost").asText(); this.apitoken = token; this.api = new GitLabApi(gitlabHost, apitoken); }