Skip to content

Commit

Permalink
Merge pull request #20 from Project-Catcher/feat-dj-add-location-code…
Browse files Browse the repository at this point in the history
…-mapping

chore: 카카오 API 키 properties에 추가
  • Loading branch information
pingu9 authored Nov 12, 2023
2 parents c082822 + d99abd1 commit 65a1591
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -13,11 +14,14 @@
@RequiredArgsConstructor
public class AddressAdapter implements AddressPort {

@Value("${kakao.api.key}")
private String kakaoApiKey;

private final KakaoApiFeignClient kakaoApiFeignClient;

@Override
public Optional<Address> 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);
return Address.createByMapsApiResponse(apiResponse);
}

Expand Down
5 changes: 3 additions & 2 deletions src/main/resources/application-dev.properties
Original file line number Diff line number Diff line change
@@ -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=
Expand All @@ -17,6 +15,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
Expand Down
5 changes: 3 additions & 2 deletions src/main/resources/application-local.properties
Original file line number Diff line number Diff line change
@@ -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=
Expand All @@ -17,6 +15,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
Expand Down
5 changes: 3 additions & 2 deletions src/main/resources/application-prod.properties
Original file line number Diff line number Diff line change
@@ -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=
Expand All @@ -18,6 +16,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
Expand Down
35 changes: 1 addition & 34 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,34 +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

## swagger - openAPI
springdoc.packagesToScan=com.catcher.resource
springdoc.pathsToMatch=/**
spring.datasource.driver-class-name=org.mariadb.jdbc.Driver

0 comments on commit 65a1591

Please sign in to comment.