From 6ae7ec5ab2f61c6cd90f80cea240ec3bd48b50eb Mon Sep 17 00:00:00 2001 From: MinchoGreenT Date: Fri, 20 Oct 2023 04:01:32 +0900 Subject: [PATCH] =?UTF-8?q?[add]=20:=20=EB=8F=84=EC=BB=A4=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=20=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 6 ++++++ build.gradle | 1 + .../com/example/farmusgateway/FarmusGatewayApplication.java | 2 ++ 3 files changed, 9 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e0d9000 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,6 @@ +FROM openjdk:11-jdk +VOLUME /tmp +ARG JAR_FILE=build/libs/farmus-gateway-0.0.1-SNAPSHOT.jar +COPY ${JAR_FILE} farmus-gateway.jar + +ENTRYPOINT ["java","-jar","/farmus-gateway.jar"] \ No newline at end of file diff --git a/build.gradle b/build.gradle index bbea0a8..0773134 100644 --- a/build.gradle +++ b/build.gradle @@ -28,6 +28,7 @@ ext { dependencies { implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.cloud:spring-cloud-starter-gateway' + implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client' compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/src/main/java/com/example/farmusgateway/FarmusGatewayApplication.java b/src/main/java/com/example/farmusgateway/FarmusGatewayApplication.java index c573d35..f4cb154 100644 --- a/src/main/java/com/example/farmusgateway/FarmusGatewayApplication.java +++ b/src/main/java/com/example/farmusgateway/FarmusGatewayApplication.java @@ -2,8 +2,10 @@ import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cloud.client.discovery.EnableDiscoveryClient; @SpringBootApplication +@EnableDiscoveryClient // eureka client public class FarmusGatewayApplication { public static void main(String[] args) {