From a91957f1882c5efac6c3c5f85c1f69ed3135702d Mon Sep 17 00:00:00 2001 From: bum12ark Date: Sun, 30 Jan 2022 20:53:43 +0900 Subject: [PATCH 01/12] =?UTF-8?q?=EC=A3=BC=EB=AC=B8=20url=20=EB=A7=A4?= =?UTF-8?q?=ED=95=91=20=EB=B0=8F=20=EA=B8=B0=EB=B3=B8=20=ED=85=9C=ED=94=8C?= =?UTF-8?q?=EB=A6=BF=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../OwnerFrontendServiceApplication.java | 2 + .../domain/order/web/OrderController.java | 15 +++ .../templates/domain/order/order.html | 105 ++++++++++++++++++ 3 files changed, 122 insertions(+) create mode 100644 owner-frontend-service/src/main/java/com/justpickup/ownerfrontendservice/domain/order/web/OrderController.java create mode 100644 owner-frontend-service/src/main/resources/templates/domain/order/order.html diff --git a/owner-frontend-service/src/main/java/com/justpickup/ownerfrontendservice/OwnerFrontendServiceApplication.java b/owner-frontend-service/src/main/java/com/justpickup/ownerfrontendservice/OwnerFrontendServiceApplication.java index b749864..698f81a 100644 --- a/owner-frontend-service/src/main/java/com/justpickup/ownerfrontendservice/OwnerFrontendServiceApplication.java +++ b/owner-frontend-service/src/main/java/com/justpickup/ownerfrontendservice/OwnerFrontendServiceApplication.java @@ -2,8 +2,10 @@ package com.justpickup.ownerfrontendservice; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cloud.netflix.eureka.EnableEurekaClient; @SpringBootApplication +@EnableEurekaClient public class OwnerFrontendServiceApplication { public static void main(String[] args) { diff --git a/owner-frontend-service/src/main/java/com/justpickup/ownerfrontendservice/domain/order/web/OrderController.java b/owner-frontend-service/src/main/java/com/justpickup/ownerfrontendservice/domain/order/web/OrderController.java new file mode 100644 index 0000000..c4b4a08 --- /dev/null +++ b/owner-frontend-service/src/main/java/com/justpickup/ownerfrontendservice/domain/order/web/OrderController.java @@ -0,0 +1,15 @@ +package com.justpickup.ownerfrontendservice.domain.order.web; + +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; + +@Controller +@Slf4j +public class OrderController { + + @GetMapping("/order") + public String order() { + return "/domain/order/order"; + } +} diff --git a/owner-frontend-service/src/main/resources/templates/domain/order/order.html b/owner-frontend-service/src/main/resources/templates/domain/order/order.html new file mode 100644 index 0000000..7255fa2 --- /dev/null +++ b/owner-frontend-service/src/main/resources/templates/domain/order/order.html @@ -0,0 +1,105 @@ + + + + + + +
+ +

주문

+ + +
2022년 01년 14일
+ + +
+ +
+
+
+ 닉네임 +
+
+
+ + 메뉴1, 메뉴2, 메뉴3 + +
+

+ 오전 11:03 +

+ 상세보기 +
+ +
+
+ + + +
+
+
+ 닉네임 +
+
+
+ + 메뉴1, 메뉴2, 메뉴3, 메뉴4, 메뉴5, 메뉴6 + +
+

+ 오후 04:03 +

+ 상세보기 +
+ +
+
+ + + +
+
+
+ 닉네임 +
+
+
+ + 메뉴1, 메뉴2 + +
+

+ 오후 10:45 +

+ 상세보기 +
+ +
+
+ + +
+ + +
+ + \ No newline at end of file From 355041e4ef67fed86a4062a51658e8967e158907 Mon Sep 17 00:00:00 2001 From: bum12ark Date: Sun, 30 Jan 2022 23:30:54 +0900 Subject: [PATCH 02/12] =?UTF-8?q?owner-apigateway-service=20=EB=9D=BC?= =?UTF-8?q?=EC=9A=B0=ED=8C=85=20=EC=A0=95=EB=B3=B4=20=EC=B6=94=EA=B0=80=20?= =?UTF-8?q?-=20owner-frontend-service=20-=20order-service?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/owner-apigateway-service/src/main/resources/application.yml b/owner-apigateway-service/src/main/resources/application.yml index 99e5f31..ee1c4db 100644 --- a/owner-apigateway-service/src/main/resources/application.yml +++ b/owner-apigateway-service/src/main/resources/application.yml @@ -10,4 +10,20 @@ eureka: spring: application: - name: owner-apigateway-service \ No newline at end of file + name: owner-apigateway-service + + cloud: + gateway: + routes: + - id: owner-frontend-service + uri: lb://OWNER-FRONTEND-SERVICE + predicates: + - Path=/owner-frontend-service/** + filters: + - RewritePath=/owner-frontend-service/(?.*),/$\{segment} + - id: order-service + uri: lb://ORDER-SERVCIE + predicates: + - Path=/order-service/** + filters: + - RewritePath=/order-service/(?.*),/$\{segment} \ No newline at end of file From 267ba0e4c269d2ef4ae89282f463bf77dc36dc14 Mon Sep 17 00:00:00 2001 From: bum12ark Date: Sun, 30 Jan 2022 23:31:29 +0900 Subject: [PATCH 03/12] =?UTF-8?q?Spring=20Cloud=20Gateway=20M1=20=EC=B9=A9?= =?UTF-8?q?=20=ED=98=B8=ED=99=98=20=EB=AC=B8=EC=A0=9C=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- owner-apigateway-service/build.gradle | 3 +++ 1 file changed, 3 insertions(+) diff --git a/owner-apigateway-service/build.gradle b/owner-apigateway-service/build.gradle index 75e1e29..ab169ca 100644 --- a/owner-apigateway-service/build.gradle +++ b/owner-apigateway-service/build.gradle @@ -26,6 +26,9 @@ dependencies { implementation 'org.springframework.cloud:spring-cloud-starter-circuitbreaker-resilience4j' implementation 'org.springframework.cloud:spring-cloud-starter-gateway' implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client' + // https://mvnrepository.com/artifact/io.netty/netty-resolver-dns-native-macos + implementation 'io.netty:netty-resolver-dns-native-macos:4.1.68.Final:osx-aarch_64' + compileOnly 'org.projectlombok:lombok' developmentOnly 'org.springframework.boot:spring-boot-devtools' annotationProcessor 'org.projectlombok:lombok' From 033b21b791c94431ed4bdabb396f7404e45d8e04 Mon Sep 17 00:00:00 2001 From: bum12ark Date: Sun, 30 Jan 2022 23:33:01 +0900 Subject: [PATCH 04/12] =?UTF-8?q?Spring=20Cloud=20Gateway=20=EC=82=AC?= =?UTF-8?q?=EC=9A=A9=EC=9C=BC=EB=A1=9C=20=EC=9D=B8=ED=95=9C=20src=20?= =?UTF-8?q?=EB=B0=8F=20href=20=ED=98=95=EC=8B=9D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/static/common.js | 4 ++++ .../resources/templates/fragments/navbar.html | 8 ++++---- .../main/resources/templates/layouts/layout.html | 15 ++++++++------- 3 files changed, 16 insertions(+), 11 deletions(-) create mode 100644 owner-frontend-service/src/main/resources/static/common.js diff --git a/owner-frontend-service/src/main/resources/static/common.js b/owner-frontend-service/src/main/resources/static/common.js new file mode 100644 index 0000000..9134f34 --- /dev/null +++ b/owner-frontend-service/src/main/resources/static/common.js @@ -0,0 +1,4 @@ +const ownerApiGatewayIp = "http://127.0.0.1:8001/"; +const url = { + orderService : ownerApiGatewayIp + "order-service/" +} \ No newline at end of file diff --git a/owner-frontend-service/src/main/resources/templates/fragments/navbar.html b/owner-frontend-service/src/main/resources/templates/fragments/navbar.html index 7a55f65..7dbbe82 100644 --- a/owner-frontend-service/src/main/resources/templates/fragments/navbar.html +++ b/owner-frontend-service/src/main/resources/templates/fragments/navbar.html @@ -118,7 +118,7 @@ @@ -130,7 +130,7 @@ @@ -142,7 +142,7 @@ @@ -176,7 +176,7 @@ data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> Douglas McGee + src="img/undraw_profile.svg"> - - + + - + - + - + +