diff --git a/Briefing-Api/src/main/java/com/example/briefingapi/briefing/presentation/BriefingApi.java b/Briefing-Api/src/main/java/com/example/briefingapi/briefing/presentation/BriefingApi.java index 7e56b64..69d46b4 100644 --- a/Briefing-Api/src/main/java/com/example/briefingapi/briefing/presentation/BriefingApi.java +++ b/Briefing-Api/src/main/java/com/example/briefingapi/briefing/presentation/BriefingApi.java @@ -7,19 +7,21 @@ import com.example.briefingapi.security.handler.annotation.AuthMember; import com.example.briefingcommon.common.presentation.response.CommonResponse; import com.example.briefingcommon.entity.Member; -import jakarta.validation.Valid; - -import org.springdoc.core.annotations.ParameterObject; -import org.springframework.cache.annotation.CacheEvict; -import org.springframework.http.HttpStatus; -import org.springframework.web.bind.annotation.*; - - -import com.example.briefingapi.annotation.CacheEvictByBriefingId; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.validation.Valid; import lombok.RequiredArgsConstructor; +import org.springdoc.core.annotations.ParameterObject; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.ModelAttribute; +import org.springframework.web.bind.annotation.PatchMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.ResponseStatus; +import org.springframework.web.bind.annotation.RestController; @Tag(name = "03-Briefing \uD83D\uDCF0", description = "브리핑 관련 API") @RestController @@ -44,7 +46,7 @@ public CommonResponse findBriefing( return CommonResponse.onSuccess(briefingService.findBriefing(id, member)); } - @CacheEvict(value = "findBriefingsV2", key = "#request.getBriefingType()") +// @CacheEvict(value = "findBriefingsV2", key = "#request.getBriefingType()") @PostMapping("/briefings") @ResponseStatus(HttpStatus.CREATED) @Operation(summary = "03-03Briefing \uD83D\uDCF0 브리핑 등록", description = "") @@ -62,7 +64,7 @@ public void createBriefing(@RequestBody final BriefingRequestDTO.BriefingCreate * @param id, BriefingResponseDTO.BriefingUpdateDTO * @return 수정된 값, 요청으로 온 값과 동일 */ - @CacheEvictByBriefingId(value = "findBriefingsV2", briefingId = "#id") +// @CacheEvictByBriefingId(value = "findBriefingsV2", briefingId = "#id") @Operation(summary = "03-04Briefing \uD83D\uDCF0 브리핑 내용 수정", description = "") @Parameter(name = "id", description = "브리핑 아이디", example = "1") @PatchMapping("/briefings/{id}") diff --git a/Briefing-Api/src/main/java/com/example/briefingapi/briefing/presentation/BriefingV2Api.java b/Briefing-Api/src/main/java/com/example/briefingapi/briefing/presentation/BriefingV2Api.java index 48a4e4f..fe8423a 100644 --- a/Briefing-Api/src/main/java/com/example/briefingapi/briefing/presentation/BriefingV2Api.java +++ b/Briefing-Api/src/main/java/com/example/briefingapi/briefing/presentation/BriefingV2Api.java @@ -6,14 +6,16 @@ import com.example.briefingapi.security.handler.annotation.AuthMember; import com.example.briefingcommon.common.presentation.response.CommonResponse; import com.example.briefingcommon.entity.Member; -import org.springdoc.core.annotations.ParameterObject; -import org.springframework.cache.annotation.Cacheable; -import org.springframework.web.bind.annotation.*; - import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; +import org.springdoc.core.annotations.ParameterObject; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.ModelAttribute; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; @Tag(name = "03-Briefing V2 \uD83D\uDCF0", description = "브리핑 관련 API V2") @RestController @@ -24,7 +26,7 @@ public class BriefingV2Api { @GetMapping("/briefings") @Operation(summary = "03-01Briefing \uD83D\uDCF0 브리핑 목록 조회 V2", description = "") - @Cacheable(value = "findBriefingsV2", key = "#params.getType()") +// @Cacheable(value = "findBriefingsV2", key = "#params.getType()") public CommonResponse findBriefingsV2( @ParameterObject @ModelAttribute BriefingRequestParam.BriefingPreviewListParam params) { return CommonResponse.onSuccess(briefingV2Service.findBriefings(params)); diff --git a/Briefing-Api/src/main/java/com/example/briefingapi/scrap/presentation/ScrapV2Api.java b/Briefing-Api/src/main/java/com/example/briefingapi/scrap/presentation/ScrapV2Api.java index 726ea1c..e53f79f 100644 --- a/Briefing-Api/src/main/java/com/example/briefingapi/scrap/presentation/ScrapV2Api.java +++ b/Briefing-Api/src/main/java/com/example/briefingapi/scrap/presentation/ScrapV2Api.java @@ -1,20 +1,24 @@ package com.example.briefingapi.scrap.presentation; -import java.util.List; import com.example.briefingapi.scrap.business.ScrapV2Service; import com.example.briefingapi.scrap.presentation.dto.ScrapRequest; import com.example.briefingapi.scrap.presentation.dto.ScrapResponse; import com.example.briefingcommon.common.presentation.response.CommonResponse; +import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.media.Content; import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.responses.ApiResponses; -import org.springframework.web.bind.annotation.*; - -import com.example.briefingapi.annotation.CacheEvictByBriefingId; -import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; +import java.util.List; import lombok.RequiredArgsConstructor; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; @Tag(name = "05-Scrap V2 📁", description = "스크랩 관련 API V2") @RestController @@ -23,7 +27,7 @@ public class ScrapV2Api { private final ScrapV2Service scrapV2Service; - @CacheEvictByBriefingId(value = "findBriefingsV2", briefingId = "#request.getBriefingId()") +// @CacheEvictByBriefingId(value = "findBriefingsV2", briefingId = "#request.getBriefingId()") @Operation(summary = "05-01 Scrap📁 스크랩하기 V2", description = "브리핑을 스크랩하는 API입니다.") @PostMapping("/scraps/briefings") @ApiResponses({ @@ -50,7 +54,7 @@ public CommonResponse createV2( return CommonResponse.onSuccess(scrapV2Service.create(request)); } - @CacheEvictByBriefingId(value = "findBriefingsV2", briefingId = "#briefingId") +// @CacheEvictByBriefingId(value = "findBriefingsV2", briefingId = "#briefingId") @Operation(summary = "05-02 Scrap📁 스크랩 취소 V2", description = "스크랩을 취소하는 API입니다.") @DeleteMapping("/scraps/briefings/{briefingId}/members/{memberId}") @ApiResponses({