From 7f9eae22ef067a27fc3f51a9deaaaae4127edf0c Mon Sep 17 00:00:00 2001 From: Ali CANLI Date: Mon, 18 Jul 2022 14:28:43 +0300 Subject: [PATCH] Add Google k8n engine files and finish project... --- .../src/main/resources/application.yml | 10 ++++------ food-order-system-infra | 1 + .../src/main/resources/application.yml | 14 ++++++-------- .../src/main/resources/init-schema.sql | 6 +++--- .../src/main/resources/application.yml | 2 +- pom.xml | 2 ++ .../src/main/resources/application.yml | 12 +++++------- 7 files changed, 22 insertions(+), 25 deletions(-) create mode 160000 food-order-system-infra diff --git a/customer-service/customer-container/src/main/resources/application.yml b/customer-service/customer-container/src/main/resources/application.yml index 0a5fe2e..4e52402 100644 --- a/customer-service/customer-container/src/main/resources/application.yml +++ b/customer-service/customer-container/src/main/resources/application.yml @@ -16,13 +16,11 @@ spring: datasource: url: jdbc:postgresql://localhost:5432/postgres?currentSchema=customer&binaryTransfer=true&reWriteBatchedInserts=true username: postgres - password: postgres + password: admin driver-class-name: org.postgresql.Driver - sql: - init: - mode: always - schema-locations: classpath:init-schema.sql - platform: postgres + platform: postgres + schema: classpath:init-schema.sql + initialization-mode: always kafka-config: bootstrap-servers: localhost:19092, localhost:29092, localhost:39092 diff --git a/food-order-system-infra b/food-order-system-infra new file mode 160000 index 0000000..9a47979 --- /dev/null +++ b/food-order-system-infra @@ -0,0 +1 @@ +Subproject commit 9a47979f3745085edfef5527051ce0e3aa1c110c diff --git a/order-service/order-container/src/main/resources/application.yml b/order-service/order-container/src/main/resources/application.yml index 9f1cdae..c11ff0e 100644 --- a/order-service/order-container/src/main/resources/application.yml +++ b/order-service/order-container/src/main/resources/application.yml @@ -1,5 +1,5 @@ server: - port: 3232 + port: 8181 logging: level: com.food.order.system : DEBUG @@ -24,13 +24,11 @@ spring: datasource: url: jdbc:postgresql://localhost:5432/postgres?currentSchema=order&binaryTransfer=true&reWriteBatchedInserts=true&stringtype=unspecified username: postgres - password: postgres - driverClassName: org.postgresql.Driver - sql: - init: - platform: postgres - mode: always - schema-locations: classpath:init-schema.sql + password: admin + driver-class-name: org.postgresql.Driver + platform: postgres + schema: classpath:init-schema.sql + initialization-mode: always kafka-config: bootstrap-servers: localhost:19092, localhost:29092, localhost:39092 diff --git a/order-service/order-container/src/main/resources/init-schema.sql b/order-service/order-container/src/main/resources/init-schema.sql index 257d723..7009f9b 100644 --- a/order-service/order-container/src/main/resources/init-schema.sql +++ b/order-service/order-container/src/main/resources/init-schema.sql @@ -87,9 +87,9 @@ CREATE INDEX "payment_outbox_saga_status" ON "order".payment_outbox (type, outbox_status, saga_status); ---CREATE UNIQUE INDEX "payment_outbox_saga_id" --- ON "order".payment_outbox --- (type, saga_id, saga_status); +CREATE UNIQUE INDEX "payment_outbox_saga_id" + ON "order".payment_outbox + (type, saga_id, saga_status); DROP TABLE IF EXISTS "order".restaurant_approval_outbox CASCADE; diff --git a/payment-service/payment-container/src/main/resources/application.yml b/payment-service/payment-container/src/main/resources/application.yml index f0b0dbf..5fdd0ea 100644 --- a/payment-service/payment-container/src/main/resources/application.yml +++ b/payment-service/payment-container/src/main/resources/application.yml @@ -22,7 +22,7 @@ spring: datasource: url: jdbc:postgresql://localhost:5432/postgres?currentSchema=payment&binaryTransfer=true&reWriteBatchedInserts=true&stringtype=unspecified username: postgres - password: postgres + password: admin driver-class-name: org.postgresql.Driver platform: postgres schema: classpath:init-schema.sql diff --git a/pom.xml b/pom.xml index 7efd448..d64413c 100644 --- a/pom.xml +++ b/pom.xml @@ -32,6 +32,8 @@ 2.8.2 7.0.1 1.11.0 + 17 + 17 diff --git a/restaurant-service/restaurant-container/src/main/resources/application.yml b/restaurant-service/restaurant-container/src/main/resources/application.yml index 2d20c61..f41ea2a 100644 --- a/restaurant-service/restaurant-container/src/main/resources/application.yml +++ b/restaurant-service/restaurant-container/src/main/resources/application.yml @@ -22,14 +22,12 @@ spring: datasource: url: jdbc:postgresql://localhost:5432/postgres?currentSchema=restaurant&binaryTransfer=true&reWriteBatchedInserts=true&stringtype=unspecified username: postgres - password: postgres + password: admin driver-class-name: org.postgresql.Driver - sql: - init: - platform: postgres - mode: always - data-locations: classpath:init-data.sql - schema-locations: classpath:init-schema.sql + platform: postgres + schema: classpath:init-schema.sql + data: classpath:init-data.sql + initialization-mode: always kafka-config: bootstrap-servers: localhost:19092, localhost:29092, localhost:39092