From a9e92ac88a283ad70c5460ea2e44eefe8187fec6 Mon Sep 17 00:00:00 2001 From: "aj4941@naver.com" Date: Tue, 17 Oct 2023 20:15:33 +0900 Subject: [PATCH] =?UTF-8?q?:pencil2:=20[FIX]=20java=20code=20=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=EB=AA=85=20=EC=88=98=EC=A0=95=20=EB=B0=8F=20=EA=B2=BD?= =?UTF-8?q?=EB=A1=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 6 +++--- .../domain/testStart/service/TempCodeInitializer.java | 6 +----- src/main/resources/codes/{Main.java => temp.java} | 0 3 files changed, 4 insertions(+), 8 deletions(-) rename src/main/resources/codes/{Main.java => temp.java} (100%) diff --git a/Dockerfile b/Dockerfile index 0136033b..a6aa2295 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,8 +3,8 @@ FROM openjdk:17-oracle ARG JAR_FILE=build/libs/*.jar COPY ${JAR_FILE} app.jar -COPY src/resources/codes/temp.cpp /codes/temp.cpp -COPY src/resources/codes/temp.py /codes/temp.py -COPY src/resources/codes/Main.java /codes/Main.java +COPY src/main/resources/codes/temp.cpp /codes/temp.cpp +COPY src/main/resources/codes/temp.py /codes/temp.py +COPY src/main/resources/codes/temp.java /codes/temp.java ENTRYPOINT ["java","-jar","/app.jar"] diff --git a/src/main/java/swm_nm/morandi/domain/testStart/service/TempCodeInitializer.java b/src/main/java/swm_nm/morandi/domain/testStart/service/TempCodeInitializer.java index 0194fa89..b16b158f 100644 --- a/src/main/java/swm_nm/morandi/domain/testStart/service/TempCodeInitializer.java +++ b/src/main/java/swm_nm/morandi/domain/testStart/service/TempCodeInitializer.java @@ -5,9 +5,7 @@ import org.springframework.data.redis.core.RedisTemplate; import org.springframework.stereotype.Service; import swm_nm.morandi.domain.testDuring.dto.TempCode; -import swm_nm.morandi.domain.testInfo.entity.AttemptProblem; import swm_nm.morandi.domain.testInfo.entity.Tests; -import swm_nm.morandi.domain.testRecord.repository.AttemptProblemRepository; import javax.annotation.PostConstruct; import java.io.IOException; @@ -15,10 +13,8 @@ import java.nio.file.Paths; import java.time.Duration; import java.time.LocalDateTime; -import java.util.ArrayList; import java.util.List; import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.IntStream; @Service @@ -38,7 +34,7 @@ public void initTempCodeInitializer() { languages = List.of("Python", "Cpp", "Java"); String pythonCode = readCodeFromFile("codes/temp.py"); String cppCode = readCodeFromFile("codes/temp.cpp"); - String javaCode = readCodeFromFile("codes/Main.java"); + String javaCode = readCodeFromFile("codes/temp.java"); codeLists = List.of(pythonCode, cppCode, javaCode); } diff --git a/src/main/resources/codes/Main.java b/src/main/resources/codes/temp.java similarity index 100% rename from src/main/resources/codes/Main.java rename to src/main/resources/codes/temp.java