From a1038038a5914301431b7cb7429bd4da0ba765c3 Mon Sep 17 00:00:00 2001 From: JiinHong Date: Sat, 19 Oct 2024 20:42:00 +0900 Subject: [PATCH 1/5] =?UTF-8?q?feat:=20=ED=8F=AC=ED=86=A0=EB=B6=80?= =?UTF-8?q?=EC=8A=A4=20=EA=B2=80=EC=83=89=20API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/photobooth/PhotoBoothSearchDto.java | 7 +++++ .../port/photobooth/PhotoBoothSearchPort.java | 11 +++++++ .../service/photobooth/PhotoBoothService.java | 11 ++++++- .../photobooth/PhotoBoothSearchUseCase.java | 11 +++++++ .../presentation/PhotoBoothController.java | 8 +++++ .../PhotoBoothControllerDocs.java | 13 +++++++++ .../review/presentation/ReviewController.java | 2 -- .../adapter/PhotoBoothSerachAdapter.java | 29 +++++++++++++++++++ .../photobooth/PhotoBoothRepository.java | 3 ++ 9 files changed, 92 insertions(+), 3 deletions(-) create mode 100644 domain/src/main/java/com/pocket/domain/dto/photobooth/PhotoBoothSearchDto.java create mode 100644 domain/src/main/java/com/pocket/domain/port/photobooth/PhotoBoothSearchPort.java create mode 100644 domain/src/main/java/com/pocket/domain/usecase/photobooth/PhotoBoothSearchUseCase.java create mode 100644 outbound/src/main/java/com/pocket/outbound/adapter/photobooth/adapter/PhotoBoothSerachAdapter.java diff --git a/domain/src/main/java/com/pocket/domain/dto/photobooth/PhotoBoothSearchDto.java b/domain/src/main/java/com/pocket/domain/dto/photobooth/PhotoBoothSearchDto.java new file mode 100644 index 0000000..2830059 --- /dev/null +++ b/domain/src/main/java/com/pocket/domain/dto/photobooth/PhotoBoothSearchDto.java @@ -0,0 +1,7 @@ +package com.pocket.domain.dto.photobooth; + +public record PhotoBoothSearchDto( + Long id, + String name +) { +} diff --git a/domain/src/main/java/com/pocket/domain/port/photobooth/PhotoBoothSearchPort.java b/domain/src/main/java/com/pocket/domain/port/photobooth/PhotoBoothSearchPort.java new file mode 100644 index 0000000..39d670a --- /dev/null +++ b/domain/src/main/java/com/pocket/domain/port/photobooth/PhotoBoothSearchPort.java @@ -0,0 +1,11 @@ +package com.pocket.domain.port.photobooth; + +import com.pocket.domain.dto.photobooth.PhotoBoothSearchDto; + +import java.util.List; + +public interface PhotoBoothSearchPort { + + List searchPhotoBooth(String keyword); + +} diff --git a/domain/src/main/java/com/pocket/domain/service/photobooth/PhotoBoothService.java b/domain/src/main/java/com/pocket/domain/service/photobooth/PhotoBoothService.java index b9ae787..9fa507d 100644 --- a/domain/src/main/java/com/pocket/domain/service/photobooth/PhotoBoothService.java +++ b/domain/src/main/java/com/pocket/domain/service/photobooth/PhotoBoothService.java @@ -2,13 +2,16 @@ import com.pocket.domain.dto.photobooth.NearPhotoBoothInfo; import com.pocket.domain.dto.photobooth.PhotoBoothFindResponseDto; +import com.pocket.domain.dto.photobooth.PhotoBoothSearchDto; import com.pocket.domain.entity.photobooth.PhotoBoothBrand; import com.pocket.domain.port.photobooth.PhotoBoothFindPort; import com.pocket.domain.port.photobooth.PhotoBoothGetNamePort; import com.pocket.domain.port.photobooth.PhotoBoothGetRatingPort; +import com.pocket.domain.port.photobooth.PhotoBoothSearchPort; import com.pocket.domain.usecase.photobooth.PhotoBoothFindUseCase; import com.pocket.domain.usecase.photobooth.PhotoBoothGetNameUseCase; import com.pocket.domain.usecase.photobooth.PhotoBoothGetRatingUseCase; +import com.pocket.domain.usecase.photobooth.PhotoBoothSearchUseCase; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; @@ -18,11 +21,12 @@ @Service @RequiredArgsConstructor -public class PhotoBoothService implements PhotoBoothFindUseCase, PhotoBoothGetNameUseCase, PhotoBoothGetRatingUseCase { +public class PhotoBoothService implements PhotoBoothFindUseCase, PhotoBoothGetNameUseCase, PhotoBoothGetRatingUseCase, PhotoBoothSearchUseCase { private final PhotoBoothFindPort photoBoothFindPort; private final PhotoBoothGetRatingPort photoBoothGetRatingPort; private final PhotoBoothGetNamePort photoBoothGetNamePort; + private final PhotoBoothSearchPort photoBoothSearchPort; public PhotoBoothFindResponseDto findPhotoBoothResponse(Long id) { return photoBoothFindPort.findById(id); @@ -38,4 +42,9 @@ public List findNearPhotoBooth(double lat, double lon, List< public BigDecimal getPhotoBoothRating(Long photoboothId) { return photoBoothGetRatingPort.getRating(photoboothId); } + + @Override + public List SearchPhotoBooth(String keyword) { + return photoBoothSearchPort.searchPhotoBooth(keyword); + } } diff --git a/domain/src/main/java/com/pocket/domain/usecase/photobooth/PhotoBoothSearchUseCase.java b/domain/src/main/java/com/pocket/domain/usecase/photobooth/PhotoBoothSearchUseCase.java new file mode 100644 index 0000000..7dd717c --- /dev/null +++ b/domain/src/main/java/com/pocket/domain/usecase/photobooth/PhotoBoothSearchUseCase.java @@ -0,0 +1,11 @@ +package com.pocket.domain.usecase.photobooth; + +import com.pocket.domain.dto.photobooth.PhotoBoothSearchDto; + +import java.util.List; + +public interface PhotoBoothSearchUseCase { + + List SearchPhotoBooth(String keyword); + +} diff --git a/inbounds/src/main/java/com/pocket/inbounds/photobooth/presentation/PhotoBoothController.java b/inbounds/src/main/java/com/pocket/inbounds/photobooth/presentation/PhotoBoothController.java index 6dd181c..b314e57 100644 --- a/inbounds/src/main/java/com/pocket/inbounds/photobooth/presentation/PhotoBoothController.java +++ b/inbounds/src/main/java/com/pocket/inbounds/photobooth/presentation/PhotoBoothController.java @@ -3,11 +3,13 @@ import com.pocket.core.exception.common.ApplicationResponse; import com.pocket.domain.dto.photobooth.NearPhotoBoothInfo; import com.pocket.domain.dto.photobooth.PhotoBoothFindResponseDto; +import com.pocket.domain.dto.photobooth.PhotoBoothSearchDto; import com.pocket.domain.entity.photobooth.PhotoBoothBrand; import com.pocket.domain.port.photobooth.PhotoBoothGetNamePort; import com.pocket.domain.usecase.photobooth.PhotoBoothFindUseCase; import com.pocket.domain.usecase.photobooth.PhotoBoothGetNameUseCase; import com.pocket.domain.usecase.photobooth.PhotoBoothGetRatingUseCase; +import com.pocket.domain.usecase.photobooth.PhotoBoothSearchUseCase; import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.*; @@ -22,6 +24,7 @@ public class PhotoBoothController implements PhotoBoothControllerDocs { private final PhotoBoothFindUseCase photoBoothFindUseCase; private final PhotoBoothGetRatingUseCase photoBoothGetRatingUseCase; private final PhotoBoothGetNameUseCase photoBoothGetNameUseCase; + private final PhotoBoothSearchUseCase photoBoothSearchUseCase; @GetMapping("{id}") public ApplicationResponse getPhotoBoothById(@PathVariable("id") Long id) { @@ -53,4 +56,9 @@ public ApplicationResponse getPhotoBoothRating(@PathVariable("id") L return ApplicationResponse.ok(response); } + @GetMapping("/search/{keyword}") + public ApplicationResponse> searchPhotoBooth(@PathVariable("keyword") String keyword) { + List response = photoBoothSearchUseCase.SearchPhotoBooth(keyword); + return ApplicationResponse.ok(response); + } } diff --git a/inbounds/src/main/java/com/pocket/inbounds/photobooth/presentation/PhotoBoothControllerDocs.java b/inbounds/src/main/java/com/pocket/inbounds/photobooth/presentation/PhotoBoothControllerDocs.java index 70570c9..72a7ccd 100644 --- a/inbounds/src/main/java/com/pocket/inbounds/photobooth/presentation/PhotoBoothControllerDocs.java +++ b/inbounds/src/main/java/com/pocket/inbounds/photobooth/presentation/PhotoBoothControllerDocs.java @@ -4,6 +4,7 @@ import com.pocket.core.exception.common.ApplicationResponse; import com.pocket.domain.dto.photobooth.NearPhotoBoothInfo; import com.pocket.domain.dto.photobooth.PhotoBoothFindResponseDto; +import com.pocket.domain.dto.photobooth.PhotoBoothSearchDto; import com.pocket.domain.entity.photobooth.PhotoBoothBrand; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.media.Content; @@ -66,4 +67,16 @@ ApplicationResponse> getAllPhotoBooth( @Operation(summary = "포토부스 평점 조회", description = "해당 id의 포토부스에 대한 평점을 제공하는 API") ApplicationResponse getPhotoBoothRating( @PathVariable("id") Long id); + + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "OK"), + @ApiResponse(responseCode = "400", description = "BAD REQUEST", + content = {@Content(schema = @Schema(implementation = ErrorResponse.class))}), + @ApiResponse(responseCode = "500", description = "INTERNAL SERVER ERROR", + content = {@Content(schema = @Schema(implementation = ErrorResponse.class))}) + }) + @Operation(summary = "포토부스 검색", description = "keyword를 주면 해당 keyword가 포함된 이름의 포토부스 이름을 제공하는 API") + ApplicationResponse> searchPhotoBooth( + @PathVariable("keyword") String keyword + ); } diff --git a/inbounds/src/main/java/com/pocket/inbounds/review/presentation/ReviewController.java b/inbounds/src/main/java/com/pocket/inbounds/review/presentation/ReviewController.java index 7a35945..2aab302 100644 --- a/inbounds/src/main/java/com/pocket/inbounds/review/presentation/ReviewController.java +++ b/inbounds/src/main/java/com/pocket/inbounds/review/presentation/ReviewController.java @@ -24,8 +24,6 @@ public class ReviewController implements ReviewControllerDocs { private final ReviewGetBoothFeatureUseCase reviewGetBoothFeatureUseCase; private final ReviewGetPhotoFeatureUseCase reviewGetPhotoFeatureUseCase; - - @PostMapping public ApplicationResponse postReview( @RequestBody ReviewRegisterRequestDto requestDto, diff --git a/outbound/src/main/java/com/pocket/outbound/adapter/photobooth/adapter/PhotoBoothSerachAdapter.java b/outbound/src/main/java/com/pocket/outbound/adapter/photobooth/adapter/PhotoBoothSerachAdapter.java new file mode 100644 index 0000000..4baee31 --- /dev/null +++ b/outbound/src/main/java/com/pocket/outbound/adapter/photobooth/adapter/PhotoBoothSerachAdapter.java @@ -0,0 +1,29 @@ +package com.pocket.outbound.adapter.photobooth.adapter; + + +import com.pocket.core.aop.annotation.AdapterService; +import com.pocket.domain.dto.photobooth.PhotoBoothSearchDto; +import com.pocket.domain.port.photobooth.PhotoBoothSearchPort; +import com.pocket.outbound.entity.photobooth.JpaPhotoBooth; +import com.pocket.outbound.repository.photobooth.PhotoBoothRepository; +import lombok.RequiredArgsConstructor; + +import java.util.ArrayList; +import java.util.List; + +@AdapterService +@RequiredArgsConstructor +public class PhotoBoothSerachAdapter implements PhotoBoothSearchPort { + + private final PhotoBoothRepository photoBoothRepository; + + public List searchPhotoBooth(String keyword) { + List photoBoothList = photoBoothRepository.findByPhotoBoothNameContaining(keyword); + List photoBooths = new ArrayList<>(); + for (JpaPhotoBooth jpaPhotoBooth : photoBoothList) { + photoBooths.add(new PhotoBoothSearchDto(jpaPhotoBooth.getId(), jpaPhotoBooth.getPhotoBooth().getName())); + } + return photoBooths; + } + +} diff --git a/outbound/src/main/java/com/pocket/outbound/repository/photobooth/PhotoBoothRepository.java b/outbound/src/main/java/com/pocket/outbound/repository/photobooth/PhotoBoothRepository.java index c7529ba..26fedb7 100644 --- a/outbound/src/main/java/com/pocket/outbound/repository/photobooth/PhotoBoothRepository.java +++ b/outbound/src/main/java/com/pocket/outbound/repository/photobooth/PhotoBoothRepository.java @@ -12,4 +12,7 @@ public interface PhotoBoothRepository extends JpaRepository Optional findByPhotoBoothNameAndPhotoBoothXAndPhotoBoothY(String name, double x, double y); List findByPhotoBoothPhotoBoothBrandIn(List brands); + + List findByPhotoBoothNameContaining(String keyword); + } From 1d1af3c4537d17984849feb8901bfa5cf6e7da76 Mon Sep 17 00:00:00 2001 From: JiinHong Date: Sat, 19 Oct 2024 20:43:12 +0900 Subject: [PATCH 2/5] =?UTF-8?q?feat:=20=ED=8F=AC=ED=86=A0=EB=B6=80?= =?UTF-8?q?=EC=8A=A4=20=EA=B2=80=EC=83=89=20API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../photobooth/presentation/PhotoBoothControllerDocs.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inbounds/src/main/java/com/pocket/inbounds/photobooth/presentation/PhotoBoothControllerDocs.java b/inbounds/src/main/java/com/pocket/inbounds/photobooth/presentation/PhotoBoothControllerDocs.java index 72a7ccd..acd0b1b 100644 --- a/inbounds/src/main/java/com/pocket/inbounds/photobooth/presentation/PhotoBoothControllerDocs.java +++ b/inbounds/src/main/java/com/pocket/inbounds/photobooth/presentation/PhotoBoothControllerDocs.java @@ -75,7 +75,7 @@ ApplicationResponse getPhotoBoothRating( @ApiResponse(responseCode = "500", description = "INTERNAL SERVER ERROR", content = {@Content(schema = @Schema(implementation = ErrorResponse.class))}) }) - @Operation(summary = "포토부스 검색", description = "keyword를 주면 해당 keyword가 포함된 이름의 포토부스 이름을 제공하는 API") + @Operation(summary = "포토부스 검색", description = "keyword를 주면 해당 keyword가 포함된 이름의 포토부스 id와 이름을 제공하는 API") ApplicationResponse> searchPhotoBooth( @PathVariable("keyword") String keyword ); From 6df59c8bdd408e71ec63c995e401c62e3f9f768f Mon Sep 17 00:00:00 2001 From: JiinHong Date: Sun, 20 Oct 2024 20:55:47 +0900 Subject: [PATCH 3/5] =?UTF-8?q?feat:=20=EC=88=98=EC=A0=95=EC=82=AC?= =?UTF-8?q?=ED=95=AD=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/src/main/resources/application-s3.yml | 15 +++++++ docker-compose.yml | 28 +++++++++++++ .../service/photobooth/PhotoBoothService.java | 3 +- .../photobooth/PhotoBoothSearchUseCase.java | 2 +- .../src/main/resources/application-prod.yml | 35 ++++++++++++++++ .../presentation/PhotoBoothController.java | 6 +-- .../adapter/PhotoBoothSerachAdapter.java | 12 +++--- .../src/main/resources/application-oauth.yml | 41 +++++++++++++++++++ 8 files changed, 131 insertions(+), 11 deletions(-) diff --git a/core/src/main/resources/application-s3.yml b/core/src/main/resources/application-s3.yml index e69de29..7444af2 100644 --- a/core/src/main/resources/application-s3.yml +++ b/core/src/main/resources/application-s3.yml @@ -0,0 +1,15 @@ +# S3 +cloud: + aws: + s3: + bucket: imagedata-ec2-pocket4cut + url: https://imagedata-ec2-pocket4cut.s3.ap-northeast-2.amazonaws.com/ + expTime: 900000 # 15분 + credentials: + access-key: AKIA5FTY6F7TUYFDUPFZ + secret-key: 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 + region: + static: ap-northeast-2 + auto: false + stack: + auto: false \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index e69de29..5872f74 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -0,0 +1,28 @@ +version: '3.8' +services: + redis: + container_name: redis + image: redis:latest + ports: + - "6379:6379" + networks: + - db_network + restart: always + koa-app: + container_name: pocket-app + build: . + image: anjeonghoo/pocket + environment: + - SPRING_DATASOURCE_USERNAME=pocketdatabase + - SPRING_DATASOURCE_PASSWORD=pocketdatabase + - SPRING_PROFILES_ACTIVE=prod + ports: + - "80:8080" + restart: always + depends_on: + - redis + networks: + - db_network +networks: + db_network: + driver: bridge diff --git a/domain/src/main/java/com/pocket/domain/service/photobooth/PhotoBoothService.java b/domain/src/main/java/com/pocket/domain/service/photobooth/PhotoBoothService.java index 9fa507d..4fd4dae 100644 --- a/domain/src/main/java/com/pocket/domain/service/photobooth/PhotoBoothService.java +++ b/domain/src/main/java/com/pocket/domain/service/photobooth/PhotoBoothService.java @@ -43,8 +43,7 @@ public BigDecimal getPhotoBoothRating(Long photoboothId) { return photoBoothGetRatingPort.getRating(photoboothId); } - @Override - public List SearchPhotoBooth(String keyword) { + public List searchPhotoBooth(String keyword) { return photoBoothSearchPort.searchPhotoBooth(keyword); } } diff --git a/domain/src/main/java/com/pocket/domain/usecase/photobooth/PhotoBoothSearchUseCase.java b/domain/src/main/java/com/pocket/domain/usecase/photobooth/PhotoBoothSearchUseCase.java index 7dd717c..3d7f125 100644 --- a/domain/src/main/java/com/pocket/domain/usecase/photobooth/PhotoBoothSearchUseCase.java +++ b/domain/src/main/java/com/pocket/domain/usecase/photobooth/PhotoBoothSearchUseCase.java @@ -6,6 +6,6 @@ public interface PhotoBoothSearchUseCase { - List SearchPhotoBooth(String keyword); + List searchPhotoBooth(String keyword); } diff --git a/hexagonal/src/main/resources/application-prod.yml b/hexagonal/src/main/resources/application-prod.yml index e69de29..60c2d3c 100644 --- a/hexagonal/src/main/resources/application-prod.yml +++ b/hexagonal/src/main/resources/application-prod.yml @@ -0,0 +1,35 @@ +spring: + + config: + activate: + on-profile: prod + + datasource: + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://pocket.chui4gsumgdj.ap-northeast-2.rds.amazonaws.com:3306/pocket + username: pocket + password: pocketdatabase + jpa: + show-sql: true + hibernate: + ddl-auto: update + properties: + hibernate: + dialect: org.hibernate.dialect.MySQL8Dialect + show_sql: false # hibernate 로그 남길지 + + data: + redis: + host: redis + port: 6379 + +jwt: + secret: aGFuZXVtLWZvb2Rnby1qd3Qtc2VjcmV0LWtleQo= + token: + access-expiration-time: 86400000 # 24 * 60 * 60 * 1000 = 1일 + refresh-expiration-time: 604800000 # 7 * 24 * 60 * 60 * 1000 = 7일 + +logging: + level: + org: + hibernate.sql: debug \ No newline at end of file diff --git a/inbounds/src/main/java/com/pocket/inbounds/photobooth/presentation/PhotoBoothController.java b/inbounds/src/main/java/com/pocket/inbounds/photobooth/presentation/PhotoBoothController.java index b314e57..287d239 100644 --- a/inbounds/src/main/java/com/pocket/inbounds/photobooth/presentation/PhotoBoothController.java +++ b/inbounds/src/main/java/com/pocket/inbounds/photobooth/presentation/PhotoBoothController.java @@ -56,9 +56,9 @@ public ApplicationResponse getPhotoBoothRating(@PathVariable("id") L return ApplicationResponse.ok(response); } - @GetMapping("/search/{keyword}") - public ApplicationResponse> searchPhotoBooth(@PathVariable("keyword") String keyword) { - List response = photoBoothSearchUseCase.SearchPhotoBooth(keyword); + @GetMapping("/search") + public ApplicationResponse> searchPhotoBooth(@RequestParam("keyword") String keyword) { + List response = photoBoothSearchUseCase.searchPhotoBooth(keyword); return ApplicationResponse.ok(response); } } diff --git a/outbound/src/main/java/com/pocket/outbound/adapter/photobooth/adapter/PhotoBoothSerachAdapter.java b/outbound/src/main/java/com/pocket/outbound/adapter/photobooth/adapter/PhotoBoothSerachAdapter.java index 4baee31..6f17b47 100644 --- a/outbound/src/main/java/com/pocket/outbound/adapter/photobooth/adapter/PhotoBoothSerachAdapter.java +++ b/outbound/src/main/java/com/pocket/outbound/adapter/photobooth/adapter/PhotoBoothSerachAdapter.java @@ -10,6 +10,7 @@ import java.util.ArrayList; import java.util.List; +import java.util.stream.Collectors; @AdapterService @RequiredArgsConstructor @@ -19,11 +20,12 @@ public class PhotoBoothSerachAdapter implements PhotoBoothSearchPort { public List searchPhotoBooth(String keyword) { List photoBoothList = photoBoothRepository.findByPhotoBoothNameContaining(keyword); - List photoBooths = new ArrayList<>(); - for (JpaPhotoBooth jpaPhotoBooth : photoBoothList) { - photoBooths.add(new PhotoBoothSearchDto(jpaPhotoBooth.getId(), jpaPhotoBooth.getPhotoBooth().getName())); - } - return photoBooths; + + return photoBoothList.stream() + .map(jpaPhotoBooth -> new PhotoBoothSearchDto( + jpaPhotoBooth.getId(), + jpaPhotoBooth.getPhotoBooth().getName())) + .collect(Collectors.toList()); } } diff --git a/outbound/src/main/resources/application-oauth.yml b/outbound/src/main/resources/application-oauth.yml index e69de29..4481f8e 100644 --- a/outbound/src/main/resources/application-oauth.yml +++ b/outbound/src/main/resources/application-oauth.yml @@ -0,0 +1,41 @@ +security: + jwt: + secret: aGFuZXVtLWZvb2Rnby1qd3Qtc2VjcmV0LWtleQo= + token: + access-expiration-time: 86400000 # 24 * 60 * 60 * 1000 = 1일 + refresh-expiration-time: 604800000 # 7 * 24 * 60 * 60 * 1000 = 7일 + redirect-uri: http://localhost:3000/token + +spring: + main: + allow-bean-definition-overriding: true + cloud: + openfeign: + client: + config: + kakao-oidc-key-client: + url: https://kauth.kakao.com + security: + oauth2: + client: + registration: + kakao: + client-id: 154ebd8a46f07d3d82f872f6e5118e7d + redirect-uri: http://localhost:8080/login/oauth2/code/kakao + authorization-grant-type: authorization_code + scope: openid, profile_nickname, account_email # OIDC scope 추가 + provider: + kakao: + authorization-uri: https://kauth.kakao.com/oauth/authorize + token-uri: https://kauth.kakao.com/oauth/token + user-info-uri: https://kapi.kakao.com/v2/user/me + jwk-set-uri: https://kauth.kakao.com/.well-known/jwks.json + +oauth: + kakao: + iss: https://kauth.kakao.com + client-id: 154ebd8a46f07d3d82f872f6e5118e7d + +logging: + level: + org.springframework.security: DEBUG \ No newline at end of file From 76e14d470cf5c8a5acbb07e6f123f0209693b915 Mon Sep 17 00:00:00 2001 From: JiinHong Date: Sun, 20 Oct 2024 20:56:12 +0900 Subject: [PATCH 4/5] =?UTF-8?q?feat:=20=EC=88=98=EC=A0=95=EC=82=AC?= =?UTF-8?q?=ED=95=AD=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/src/main/resources/application-s3.yml | 15 ------- docker-compose.yml | 28 ------------- .../src/main/resources/application-prod.yml | 35 ---------------- .../src/main/resources/application-oauth.yml | 41 ------------------- 4 files changed, 119 deletions(-) diff --git a/core/src/main/resources/application-s3.yml b/core/src/main/resources/application-s3.yml index 7444af2..e69de29 100644 --- a/core/src/main/resources/application-s3.yml +++ b/core/src/main/resources/application-s3.yml @@ -1,15 +0,0 @@ -# S3 -cloud: - aws: - s3: - bucket: imagedata-ec2-pocket4cut - url: https://imagedata-ec2-pocket4cut.s3.ap-northeast-2.amazonaws.com/ - expTime: 900000 # 15분 - credentials: - access-key: AKIA5FTY6F7TUYFDUPFZ - secret-key: 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 - region: - static: ap-northeast-2 - auto: false - stack: - auto: false \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 5872f74..e69de29 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,28 +0,0 @@ -version: '3.8' -services: - redis: - container_name: redis - image: redis:latest - ports: - - "6379:6379" - networks: - - db_network - restart: always - koa-app: - container_name: pocket-app - build: . - image: anjeonghoo/pocket - environment: - - SPRING_DATASOURCE_USERNAME=pocketdatabase - - SPRING_DATASOURCE_PASSWORD=pocketdatabase - - SPRING_PROFILES_ACTIVE=prod - ports: - - "80:8080" - restart: always - depends_on: - - redis - networks: - - db_network -networks: - db_network: - driver: bridge diff --git a/hexagonal/src/main/resources/application-prod.yml b/hexagonal/src/main/resources/application-prod.yml index 60c2d3c..e69de29 100644 --- a/hexagonal/src/main/resources/application-prod.yml +++ b/hexagonal/src/main/resources/application-prod.yml @@ -1,35 +0,0 @@ -spring: - - config: - activate: - on-profile: prod - - datasource: - driver-class-name: com.mysql.cj.jdbc.Driver - url: jdbc:mysql://pocket.chui4gsumgdj.ap-northeast-2.rds.amazonaws.com:3306/pocket - username: pocket - password: pocketdatabase - jpa: - show-sql: true - hibernate: - ddl-auto: update - properties: - hibernate: - dialect: org.hibernate.dialect.MySQL8Dialect - show_sql: false # hibernate 로그 남길지 - - data: - redis: - host: redis - port: 6379 - -jwt: - secret: aGFuZXVtLWZvb2Rnby1qd3Qtc2VjcmV0LWtleQo= - token: - access-expiration-time: 86400000 # 24 * 60 * 60 * 1000 = 1일 - refresh-expiration-time: 604800000 # 7 * 24 * 60 * 60 * 1000 = 7일 - -logging: - level: - org: - hibernate.sql: debug \ No newline at end of file diff --git a/outbound/src/main/resources/application-oauth.yml b/outbound/src/main/resources/application-oauth.yml index 4481f8e..e69de29 100644 --- a/outbound/src/main/resources/application-oauth.yml +++ b/outbound/src/main/resources/application-oauth.yml @@ -1,41 +0,0 @@ -security: - jwt: - secret: aGFuZXVtLWZvb2Rnby1qd3Qtc2VjcmV0LWtleQo= - token: - access-expiration-time: 86400000 # 24 * 60 * 60 * 1000 = 1일 - refresh-expiration-time: 604800000 # 7 * 24 * 60 * 60 * 1000 = 7일 - redirect-uri: http://localhost:3000/token - -spring: - main: - allow-bean-definition-overriding: true - cloud: - openfeign: - client: - config: - kakao-oidc-key-client: - url: https://kauth.kakao.com - security: - oauth2: - client: - registration: - kakao: - client-id: 154ebd8a46f07d3d82f872f6e5118e7d - redirect-uri: http://localhost:8080/login/oauth2/code/kakao - authorization-grant-type: authorization_code - scope: openid, profile_nickname, account_email # OIDC scope 추가 - provider: - kakao: - authorization-uri: https://kauth.kakao.com/oauth/authorize - token-uri: https://kauth.kakao.com/oauth/token - user-info-uri: https://kapi.kakao.com/v2/user/me - jwk-set-uri: https://kauth.kakao.com/.well-known/jwks.json - -oauth: - kakao: - iss: https://kauth.kakao.com - client-id: 154ebd8a46f07d3d82f872f6e5118e7d - -logging: - level: - org.springframework.security: DEBUG \ No newline at end of file From 09ea99cd5f10be20b933ce8d90e5c23d4618ce52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=95=88=EC=A0=95=ED=9B=84?= Date: Sun, 20 Oct 2024 20:59:44 +0900 Subject: [PATCH 5/5] docs: param type --- .../photobooth/presentation/PhotoBoothControllerDocs.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inbounds/src/main/java/com/pocket/inbounds/photobooth/presentation/PhotoBoothControllerDocs.java b/inbounds/src/main/java/com/pocket/inbounds/photobooth/presentation/PhotoBoothControllerDocs.java index acd0b1b..8620285 100644 --- a/inbounds/src/main/java/com/pocket/inbounds/photobooth/presentation/PhotoBoothControllerDocs.java +++ b/inbounds/src/main/java/com/pocket/inbounds/photobooth/presentation/PhotoBoothControllerDocs.java @@ -77,6 +77,6 @@ ApplicationResponse getPhotoBoothRating( }) @Operation(summary = "포토부스 검색", description = "keyword를 주면 해당 keyword가 포함된 이름의 포토부스 id와 이름을 제공하는 API") ApplicationResponse> searchPhotoBooth( - @PathVariable("keyword") String keyword + @RequestParam("keyword") String keyword ); }