From 347e3e3aba6d60aea4c219be6933659891151e54 Mon Sep 17 00:00:00 2001 From: donghae-kim Date: Wed, 20 Sep 2023 13:50:55 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20replication=20Profile=20prod=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../config/datasource/DataSourceConfig.java | 2 +- server/src/main/resources/application.yaml | 14 ++++---------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/server/src/main/java/com/project/yozmcafe/config/datasource/DataSourceConfig.java b/server/src/main/java/com/project/yozmcafe/config/datasource/DataSourceConfig.java index a840dab0..5795c558 100644 --- a/server/src/main/java/com/project/yozmcafe/config/datasource/DataSourceConfig.java +++ b/server/src/main/java/com/project/yozmcafe/config/datasource/DataSourceConfig.java @@ -13,7 +13,7 @@ import java.util.Map; @Configuration -@Profile({"!test"}) +@Profile({"prod"}) public class DataSourceConfig { public static final String MASTER_DATA_SOURCE = "master"; diff --git a/server/src/main/resources/application.yaml b/server/src/main/resources/application.yaml index 7f52a781..a726a4d9 100644 --- a/server/src/main/resources/application.yaml +++ b/server/src/main/resources/application.yaml @@ -1,15 +1,9 @@ spring: datasource: - master: - jdbc-url: jdbc:mysql://localhost:20000/yozm-cafe?useSSL=false&allowPublicKeyRetrieval=true&characterEncoding=UTF-8&serverTimezone=UTC - username: root - password: root - driver-class-name: com.mysql.cj.jdbc.Driver - slave: - jdbc-url: jdbc:mysql://localhost:20001/yozm-cafe?useSSL=false&allowPublicKeyRetrieval=true&characterEncoding=UTF-8&serverTimezone=UTC - username: root - password: root - driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://localhost:20000/yozm-cafe?useSSL=false&allowPublicKeyRetrieval=true&characterEncoding=UTF-8&serverTimezone=UTC + username: root + password: root + driver-class-name: com.mysql.cj.jdbc.Driver auth: key: testtesttesttesttesttesttesttesttesttesttesttesttesttesttest