From e16e0eae0d3473e1de66ad17c7c0d2af4ea39750 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=80=E1=85=AF=E1=86=AB=E1=84=83=E1=85=A5=E1=86=A8?= =?UTF-8?q?=E1=84=8C=E1=85=AE?= Date: Sun, 12 Nov 2023 22:32:03 +0900 Subject: [PATCH 1/3] =?UTF-8?q?chore:=20=EC=B9=B4=EC=B9=B4=EC=98=A4=20API?= =?UTF-8?q?=20=ED=82=A4=20properties=EC=97=90=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../infrastructure/external/adapter/AddressAdapter.java | 6 +++++- src/main/resources/application-dev.properties | 3 +++ src/main/resources/application-local.properties | 3 +++ src/main/resources/application-prod.properties | 3 +++ 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/catcher/infrastructure/external/adapter/AddressAdapter.java b/src/main/java/com/catcher/infrastructure/external/adapter/AddressAdapter.java index f6c26e4..ec9d94c 100644 --- a/src/main/java/com/catcher/infrastructure/external/adapter/AddressAdapter.java +++ b/src/main/java/com/catcher/infrastructure/external/adapter/AddressAdapter.java @@ -5,6 +5,7 @@ import com.catcher.core.request.MapsRequest; import com.catcher.infrastructure.external.repository.KakaoApiFeignClient; import lombok.RequiredArgsConstructor; +import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Repository; import java.util.Optional; @@ -13,11 +14,14 @@ @RequiredArgsConstructor public class AddressAdapter implements AddressPort { + @Value("${kakao.api.key}") + private String kakaoApiKey; + private final KakaoApiFeignClient kakaoApiFeignClient; @Override public Optional
getAddressByQuery(final String query) { - final var apiResponse = kakaoApiFeignClient.searchAddress(MapsRequest.createDefaultRequest(query), "${YOUR_API_KEY}"); // TODO: 키 교체 필요 + final var apiResponse = kakaoApiFeignClient.searchAddress(MapsRequest.createDefaultRequest(query), kakaoApiKey); // TODO: 키 교체 필요 return Address.createByMapsApiResponse(apiResponse); } diff --git a/src/main/resources/application-dev.properties b/src/main/resources/application-dev.properties index 07bfde5..2cab901 100644 --- a/src/main/resources/application-dev.properties +++ b/src/main/resources/application-dev.properties @@ -17,6 +17,9 @@ ssh.local-port=3306 aws.kms.keyId=03703854-534e-40ec-838c-cf65541f88f8 aws.kms.encryptionAlgorithm=SYMMETRIC_DEFAULT +## kakao +kakao.api.key=AQICAHgxTvGwZVD/2MLMvR9/01Wy8IeL4nGHGGgc5XMYIhkQ2gHpQ9T3X8ABXTrlZfQaHCb6AAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMzWswzD3/z9HQ1WWUAgEQgDtXvQXbxx434/7/6a/E7HS98MokawKTqdBkWY1eVid+ylY1AP38xkENY/RL6ER08Q4he8b6kZBL3iqq2w== + #update the schema with the given values. spring.jpa.hibernate.ddl-auto=update #To beautify or pretty print the SQL diff --git a/src/main/resources/application-local.properties b/src/main/resources/application-local.properties index 07bfde5..2cab901 100644 --- a/src/main/resources/application-local.properties +++ b/src/main/resources/application-local.properties @@ -17,6 +17,9 @@ ssh.local-port=3306 aws.kms.keyId=03703854-534e-40ec-838c-cf65541f88f8 aws.kms.encryptionAlgorithm=SYMMETRIC_DEFAULT +## kakao +kakao.api.key=AQICAHgxTvGwZVD/2MLMvR9/01Wy8IeL4nGHGGgc5XMYIhkQ2gHpQ9T3X8ABXTrlZfQaHCb6AAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMzWswzD3/z9HQ1WWUAgEQgDtXvQXbxx434/7/6a/E7HS98MokawKTqdBkWY1eVid+ylY1AP38xkENY/RL6ER08Q4he8b6kZBL3iqq2w== + #update the schema with the given values. spring.jpa.hibernate.ddl-auto=update #To beautify or pretty print the SQL diff --git a/src/main/resources/application-prod.properties b/src/main/resources/application-prod.properties index ee5b184..06becf0 100644 --- a/src/main/resources/application-prod.properties +++ b/src/main/resources/application-prod.properties @@ -18,6 +18,9 @@ ssh.local-port=3306 aws.kms.keyId=03703854-534e-40ec-838c-cf65541f88f8 aws.kms.encryptionAlgorithm=SYMMETRIC_DEFAULT +## kakao +kakao.api.key=AQICAHgxTvGwZVD/2MLMvR9/01Wy8IeL4nGHGGgc5XMYIhkQ2gHpQ9T3X8ABXTrlZfQaHCb6AAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMzWswzD3/z9HQ1WWUAgEQgDtXvQXbxx434/7/6a/E7HS98MokawKTqdBkWY1eVid+ylY1AP38xkENY/RL6ER08Q4he8b6kZBL3iqq2w== + #update the schema with the given values. spring.jpa.hibernate.ddl-auto=update #To beautify or pretty print the SQL From c71569f87a7292be04bcf86f34734a1d26527883 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=80=E1=85=AF=E1=86=AB=E1=84=83=E1=85=A5=E1=86=A8?= =?UTF-8?q?=E1=84=8C=E1=85=AE?= Date: Sun, 12 Nov 2023 22:37:50 +0900 Subject: [PATCH 2/3] =?UTF-8?q?chore:=20=EB=B6=88=ED=95=84=EC=9A=94?= =?UTF-8?q?=ED=95=9C=20=EC=A3=BC=EC=84=9D,=20properties=20=EC=A0=9C?= =?UTF-8?q?=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../external/adapter/AddressAdapter.java | 2 +- src/main/resources/application.properties | 31 +------------------ 2 files changed, 2 insertions(+), 31 deletions(-) diff --git a/src/main/java/com/catcher/infrastructure/external/adapter/AddressAdapter.java b/src/main/java/com/catcher/infrastructure/external/adapter/AddressAdapter.java index ec9d94c..73d73ee 100644 --- a/src/main/java/com/catcher/infrastructure/external/adapter/AddressAdapter.java +++ b/src/main/java/com/catcher/infrastructure/external/adapter/AddressAdapter.java @@ -21,7 +21,7 @@ public class AddressAdapter implements AddressPort { @Override public Optional
getAddressByQuery(final String query) { - final var apiResponse = kakaoApiFeignClient.searchAddress(MapsRequest.createDefaultRequest(query), kakaoApiKey); // TODO: 키 교체 필요 + final var apiResponse = kakaoApiFeignClient.searchAddress(MapsRequest.createDefaultRequest(query), kakaoApiKey); return Address.createByMapsApiResponse(apiResponse); } diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 07bfde5..cdc6516 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,30 +1 @@ -spring.datasource.driver-class-name=org.mariadb.jdbc.Driver - -## spring datasource -spring.datasource.url=AQICAHg2j0pl3GguoQNkjcreuBPYJqI3OPeLEOelKIkMSzn01AEZqo9kRIKYisZIm0Z0xpuOAAAAiDCBhQYJKoZIhvcNAQcGoHgwdgIBADBxBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDMoZI5smgDwlG+0kBgIBEIBE1VE7k3neYIx1Pkx6YqUrTf7LEBAxddoUbZVTZxC7HQJpNJKNlwMoaXXyHdPTkBW15dJiCw5jUzuY9CRV7o/vpogIg9Q= -spring.datasource.username=AQICAHg2j0pl3GguoQNkjcreuBPYJqI3OPeLEOelKIkMSzn01AGLdMIjOGdWmBOvj9YZ5685AAAAajBoBgkqhkiG9w0BBwagWzBZAgEAMFQGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMDgyL4QtIvG2hM9/5AgEQgCdVSGC6ySfTUn8ZyXKzj2x9eFu+05ACK2sP55fJtoGP0hncckeuVmQ= -spring.datasource.password=AQICAHg2j0pl3GguoQNkjcreuBPYJqI3OPeLEOelKIkMSzn01AGVzdO6dwAvzNw42TIj6JZ1AAAAaTBnBgkqhkiG9w0BBwagWjBYAgEAMFMGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMjonbIr69Og3D+ujOAgEQgCatIXU02fuulW5mm6Bn+X9e/FPMq3Fk/GhOLyYpudTHfSkRtMORQQ== - -## ssh -ssh.host=AQICAHg2j0pl3GguoQNkjcreuBPYJqI3OPeLEOelKIkMSzn01AGU6PSF+1N5z7We+p8jZ0o0AAAAaDBmBgkqhkiG9w0BBwagWTBXAgEAMFIGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQM9b3AkdokJsb66zbHAgEQgCXIPbqF5l817FjPbh2LXBzXndYJiSUqyDGZXzyfppZi3qqlSYZV -ssh.username=AQICAHg2j0pl3GguoQNkjcreuBPYJqI3OPeLEOelKIkMSzn01AE68oCmRn5p/q+G/NzwrKpHAAAAYjBgBgkqhkiG9w0BBwagUzBRAgEAMEwGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMCABMThPwxXQHcl5bAgEQgB8+W4uWWbUm8bpo7QTCtjYyJ/ZB5hv4SKstc3Xa4Ltt -ssh.password=AQICAHg2j0pl3GguoQNkjcreuBPYJqI3OPeLEOelKIkMSzn01AGlm0DJ1SuCTcwtPCyXZLYjAAAAaTBnBgkqhkiG9w0BBwagWjBYAgEAMFMGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQM1awvQRELJm1vQL/oAgEQgCasN+qZQ0q7w4FOhwRTCzPYzoMnraA1yx4T9hz2U3j4SGn3+3yEaQ== -ssh.datasource.origin=AQICAHg2j0pl3GguoQNkjcreuBPYJqI3OPeLEOelKIkMSzn01AGuDWPowi/9gzZpLApcSpl9AAAAmzCBmAYJKoZIhvcNAQcGoIGKMIGHAgEAMIGBBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDNqU18Wps+61WNJv6QIBEIBUziHPbeZlunGk/0EvzFYVr2TG4HYuwKd9bQcUdRL7PPkZqO+zdFXeYRtgfhyq/isQqKav0E7LAsnrruFaM0BfGmoqHChECFdSABUJ7+uSdWF2F/vV -ssh.port=22 -ssh.local-port=3306 - -## kms -aws.kms.keyId=03703854-534e-40ec-838c-cf65541f88f8 -aws.kms.encryptionAlgorithm=SYMMETRIC_DEFAULT - -#update the schema with the given values. -spring.jpa.hibernate.ddl-auto=update -#To beautify or pretty print the SQL -spring.jpa.properties.hibernate.format_sql=true -#show sql -spring.jpa.properties.hibernate.show-sql=true -#show parameter binding -logging.level.org.hibernate.type.descriptor.sql=DEBUG - -logging.level.org.hibernate.SQL=DEBUG -spring.jpa.properties.hibernate.dialect= org.hibernate.dialect.MariaDBDialect \ No newline at end of file +spring.datasource.driver-class-name=org.mariadb.jdbc.Driver \ No newline at end of file From 921e8a16843a72d7ff68d5d2596cb4717272931a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=80=E1=85=AF=E1=86=AB=E1=84=83=E1=85=A5=E1=86=A8?= =?UTF-8?q?=E1=84=8C=E1=85=AE?= Date: Sun, 12 Nov 2023 22:38:54 +0900 Subject: [PATCH 3/3] =?UTF-8?q?chore:=20=ED=99=98=EA=B2=BD=EB=B3=84=20prop?= =?UTF-8?q?erties=20=ED=8C=8C=EC=9D=BC=EC=97=90=EC=84=9C=20=EA=B3=B5?= =?UTF-8?q?=ED=86=B5=20=EB=B6=80=EB=B6=84=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/application-dev.properties | 2 -- src/main/resources/application-local.properties | 2 -- src/main/resources/application-prod.properties | 2 -- 3 files changed, 6 deletions(-) diff --git a/src/main/resources/application-dev.properties b/src/main/resources/application-dev.properties index 2cab901..89c1109 100644 --- a/src/main/resources/application-dev.properties +++ b/src/main/resources/application-dev.properties @@ -1,5 +1,3 @@ -spring.datasource.driver-class-name=org.mariadb.jdbc.Driver - ## spring datasource spring.datasource.url=AQICAHg2j0pl3GguoQNkjcreuBPYJqI3OPeLEOelKIkMSzn01AEZqo9kRIKYisZIm0Z0xpuOAAAAiDCBhQYJKoZIhvcNAQcGoHgwdgIBADBxBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDMoZI5smgDwlG+0kBgIBEIBE1VE7k3neYIx1Pkx6YqUrTf7LEBAxddoUbZVTZxC7HQJpNJKNlwMoaXXyHdPTkBW15dJiCw5jUzuY9CRV7o/vpogIg9Q= spring.datasource.username=AQICAHg2j0pl3GguoQNkjcreuBPYJqI3OPeLEOelKIkMSzn01AGLdMIjOGdWmBOvj9YZ5685AAAAajBoBgkqhkiG9w0BBwagWzBZAgEAMFQGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMDgyL4QtIvG2hM9/5AgEQgCdVSGC6ySfTUn8ZyXKzj2x9eFu+05ACK2sP55fJtoGP0hncckeuVmQ= diff --git a/src/main/resources/application-local.properties b/src/main/resources/application-local.properties index 2cab901..89c1109 100644 --- a/src/main/resources/application-local.properties +++ b/src/main/resources/application-local.properties @@ -1,5 +1,3 @@ -spring.datasource.driver-class-name=org.mariadb.jdbc.Driver - ## spring datasource spring.datasource.url=AQICAHg2j0pl3GguoQNkjcreuBPYJqI3OPeLEOelKIkMSzn01AEZqo9kRIKYisZIm0Z0xpuOAAAAiDCBhQYJKoZIhvcNAQcGoHgwdgIBADBxBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDMoZI5smgDwlG+0kBgIBEIBE1VE7k3neYIx1Pkx6YqUrTf7LEBAxddoUbZVTZxC7HQJpNJKNlwMoaXXyHdPTkBW15dJiCw5jUzuY9CRV7o/vpogIg9Q= spring.datasource.username=AQICAHg2j0pl3GguoQNkjcreuBPYJqI3OPeLEOelKIkMSzn01AGLdMIjOGdWmBOvj9YZ5685AAAAajBoBgkqhkiG9w0BBwagWzBZAgEAMFQGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMDgyL4QtIvG2hM9/5AgEQgCdVSGC6ySfTUn8ZyXKzj2x9eFu+05ACK2sP55fJtoGP0hncckeuVmQ= diff --git a/src/main/resources/application-prod.properties b/src/main/resources/application-prod.properties index 06becf0..ab248f3 100644 --- a/src/main/resources/application-prod.properties +++ b/src/main/resources/application-prod.properties @@ -1,5 +1,3 @@ -spring.datasource.driver-class-name=org.mariadb.jdbc.Driver - ## TODO: Need to modify Production DB ## spring datasource spring.datasource.url=AQICAHg2j0pl3GguoQNkjcreuBPYJqI3OPeLEOelKIkMSzn01AEZqo9kRIKYisZIm0Z0xpuOAAAAiDCBhQYJKoZIhvcNAQcGoHgwdgIBADBxBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDMoZI5smgDwlG+0kBgIBEIBE1VE7k3neYIx1Pkx6YqUrTf7LEBAxddoUbZVTZxC7HQJpNJKNlwMoaXXyHdPTkBW15dJiCw5jUzuY9CRV7o/vpogIg9Q=