diff --git a/src/main/java/aromanticcat/umcproject/web/controller/AuthController.java b/src/main/java/aromanticcat/umcproject/web/controller/AuthController.java index c9c1b46..30f95f9 100644 --- a/src/main/java/aromanticcat/umcproject/web/controller/AuthController.java +++ b/src/main/java/aromanticcat/umcproject/web/controller/AuthController.java @@ -6,17 +6,20 @@ import aromanticcat.umcproject.security.jwt.JwtUtil; import aromanticcat.umcproject.security.jwt.RefreshToken; import aromanticcat.umcproject.security.jwt.RefreshTokenService; -import io.swagger.v3.oas.annotations.Operation; -import java.util.Optional; +import io.swagger.annotations.ApiOperation; import lombok.AllArgsConstructor; import lombok.Data; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestHeader; import org.springframework.web.bind.annotation.RestController; +import java.util.Optional; + +@CrossOrigin(origins = "https://dev.nangmancat.shop") @Slf4j @RestController @RequiredArgsConstructor @@ -27,7 +30,7 @@ public class AuthController { private final JwtUtil jwtUtil; @PostMapping("token/logout") - @Operation(summary = "로그아웃 API", description = " 엑세스 토큰으로 현재 Redis 정보를 삭제하는 API입니다.") + @ApiOperation(value = "로그아웃 API", notes = " 엑세스 토큰으로 현재 Redis 정보를 삭제하는 API입니다.") public ApiResponse logout(@RequestHeader("Authorization") final String accessToken) { // 엑세스 토큰으로 현재 Redis 정보 삭제 @@ -36,7 +39,7 @@ public ApiResponse logout(@RequestHeader("Authorization") fin } @PostMapping("/token/refresh") - @Operation(summary = "액세스 토큰 재발급 API", description = " 엑세스 토큰을 재발급하는 API입니다.") + @ApiOperation(value = "액세스 토큰 재발급 API", notes = " 엑세스 토큰을 재발급하는 API입니다.") public ResponseEntity refresh(@RequestHeader("Authorization") final String accessToken) { // 액세스 토큰으로 Refresh 토큰 객체를 조회 diff --git a/src/main/java/aromanticcat/umcproject/web/controller/FriendController.java b/src/main/java/aromanticcat/umcproject/web/controller/FriendController.java index 6aba573..6c40173 100644 --- a/src/main/java/aromanticcat/umcproject/web/controller/FriendController.java +++ b/src/main/java/aromanticcat/umcproject/web/controller/FriendController.java @@ -5,21 +5,20 @@ import aromanticcat.umcproject.converter.FriendConverter; import aromanticcat.umcproject.entity.Friend; import aromanticcat.umcproject.service.FriendService.FriendCommandService; +import aromanticcat.umcproject.service.FriendService.FriendQueryService; import aromanticcat.umcproject.service.MemberService; -import aromanticcat.umcproject.web.dto.Friend.FriendRequestDTO; import aromanticcat.umcproject.web.dto.Friend.FriendResponseDTO; -import aromanticcat.umcproject.service.FriendService.FriendQueryService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; import lombok.RequiredArgsConstructor; -import org.springframework.data.domain.Page; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.*; import java.util.List; import java.util.stream.Collectors; +@CrossOrigin(origins = "https://dev.nangmancat.shop") @RestController @RequestMapping("/address-book") @RequiredArgsConstructor diff --git a/src/main/java/aromanticcat/umcproject/web/controller/LetterController.java b/src/main/java/aromanticcat/umcproject/web/controller/LetterController.java index cf52954..38bac7e 100644 --- a/src/main/java/aromanticcat/umcproject/web/controller/LetterController.java +++ b/src/main/java/aromanticcat/umcproject/web/controller/LetterController.java @@ -9,6 +9,7 @@ import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.*; +@CrossOrigin(origins = "https://dev.nangmancat.shop") @RestController @RequiredArgsConstructor @RequestMapping("/letters") diff --git a/src/main/java/aromanticcat/umcproject/web/controller/LetterboxController.java b/src/main/java/aromanticcat/umcproject/web/controller/LetterboxController.java index 1b56750..e7a9260 100644 --- a/src/main/java/aromanticcat/umcproject/web/controller/LetterboxController.java +++ b/src/main/java/aromanticcat/umcproject/web/controller/LetterboxController.java @@ -12,6 +12,7 @@ import java.util.List; +@CrossOrigin(origins = "https://dev.nangmancat.shop") @RestController @RequiredArgsConstructor @RequestMapping("/letterboxes") diff --git a/src/main/java/aromanticcat/umcproject/web/controller/MemberController.java b/src/main/java/aromanticcat/umcproject/web/controller/MemberController.java index 6a71b77..6886c6c 100644 --- a/src/main/java/aromanticcat/umcproject/web/controller/MemberController.java +++ b/src/main/java/aromanticcat/umcproject/web/controller/MemberController.java @@ -5,14 +5,12 @@ import aromanticcat.umcproject.entity.Member; import aromanticcat.umcproject.service.MemberService; import aromanticcat.umcproject.web.dto.MemberResponseDTO; -import io.swagger.v3.oas.annotations.Operation; +import io.swagger.annotations.ApiOperation; import lombok.RequiredArgsConstructor; import org.springframework.http.HttpStatus; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; +@CrossOrigin(origins = "https://dev.nangmancat.shop") @RestController @RequiredArgsConstructor public class MemberController { @@ -20,7 +18,7 @@ public class MemberController { private final MemberService service; @PostMapping("/signUp") - @Operation(summary = "회원가입 API", description = "회원가입 API입니다.") + @ApiOperation(value = "회원가입 API", notes = "회원가입 API입니다.") public ApiResponse signup(@RequestBody String nickname, @RequestParam String email) { try { @@ -33,7 +31,7 @@ public ApiResponse signup(@RequestBody St } @PostMapping("/mypage/nickname") - @Operation(summary = "닉네임 변경 API", description = "닉네임 변경 API입니다.") + @ApiOperation(value = "닉네임 변경 API", notes = "닉네임 변경 API입니다.") public ApiResponse updateNickname(@RequestBody String nickname) { try { Member user = service.updateNickname(nickname); diff --git a/src/main/java/aromanticcat/umcproject/web/controller/MissionController.java b/src/main/java/aromanticcat/umcproject/web/controller/MissionController.java index 274923c..fb12181 100644 --- a/src/main/java/aromanticcat/umcproject/web/controller/MissionController.java +++ b/src/main/java/aromanticcat/umcproject/web/controller/MissionController.java @@ -5,8 +5,6 @@ import aromanticcat.umcproject.service.MissionService.MissionCommandService; import aromanticcat.umcproject.service.MissionService.MissionQueryService; import aromanticcat.umcproject.web.dto.Mission.MissionResponseDTO; -import aromanticcat.umcproject.web.dto.nangmanLetterbox.NangmanCollectionResponseDTO; -import aromanticcat.umcproject.web.dto.store.StoreResponseDTO; import io.swagger.v3.oas.annotations.Operation; import lombok.RequiredArgsConstructor; import org.springframework.http.HttpStatus; @@ -14,6 +12,7 @@ import java.util.List; +@CrossOrigin(origins = "https://dev.nangmancat.shop") @RestController @RequestMapping("/missions") @RequiredArgsConstructor diff --git a/src/main/java/aromanticcat/umcproject/web/controller/MyCollectionController.java b/src/main/java/aromanticcat/umcproject/web/controller/MyCollectionController.java index 08550f5..8e6153d 100644 --- a/src/main/java/aromanticcat/umcproject/web/controller/MyCollectionController.java +++ b/src/main/java/aromanticcat/umcproject/web/controller/MyCollectionController.java @@ -7,13 +7,11 @@ import io.swagger.v3.oas.annotations.Operation; import lombok.RequiredArgsConstructor; import org.springframework.http.HttpStatus; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import java.util.List; +@CrossOrigin(origins = "https://dev.nangmancat.shop") @RestController @RequestMapping("/my-collection") @RequiredArgsConstructor diff --git a/src/main/java/aromanticcat/umcproject/web/controller/MyDesignController.java b/src/main/java/aromanticcat/umcproject/web/controller/MyDesignController.java index a22bc1e..0168f8f 100644 --- a/src/main/java/aromanticcat/umcproject/web/controller/MyDesignController.java +++ b/src/main/java/aromanticcat/umcproject/web/controller/MyDesignController.java @@ -2,7 +2,6 @@ import aromanticcat.umcproject.apiPayload.ApiResponse; import aromanticcat.umcproject.service.myCollectionService.MyDesignService; -import aromanticcat.umcproject.web.dto.Letterbox.LetterResponse; import aromanticcat.umcproject.web.dto.MyDesign.MyDesignGetResponse; import aromanticcat.umcproject.web.dto.MyDesign.MyDesignRequest; import io.swagger.annotations.ApiOperation; @@ -14,6 +13,7 @@ import java.io.IOException; import java.util.List; +@CrossOrigin(origins = "https://dev.nangmancat.shop") @RestController @RequiredArgsConstructor @RequestMapping("/myDesign") diff --git a/src/main/java/aromanticcat/umcproject/web/controller/NangmanCollectionController.java b/src/main/java/aromanticcat/umcproject/web/controller/NangmanCollectionController.java index 18b412c..1434cb8 100644 --- a/src/main/java/aromanticcat/umcproject/web/controller/NangmanCollectionController.java +++ b/src/main/java/aromanticcat/umcproject/web/controller/NangmanCollectionController.java @@ -12,6 +12,7 @@ import java.util.List; +@CrossOrigin(origins = "https://dev.nangmancat.shop") @RestController @RequestMapping("/nangman-collection") @RequiredArgsConstructor diff --git a/src/main/java/aromanticcat/umcproject/web/controller/NangmanLetterboxController.java b/src/main/java/aromanticcat/umcproject/web/controller/NangmanLetterboxController.java index 9d1c31f..dc5076e 100644 --- a/src/main/java/aromanticcat/umcproject/web/controller/NangmanLetterboxController.java +++ b/src/main/java/aromanticcat/umcproject/web/controller/NangmanLetterboxController.java @@ -16,6 +16,7 @@ import java.util.List; import java.util.stream.Collectors; +@CrossOrigin(origins = "https://dev.nangmancat.shop") @RestController @RequestMapping("/nangman-letterbox") @RequiredArgsConstructor diff --git a/src/main/java/aromanticcat/umcproject/web/controller/RootController.java b/src/main/java/aromanticcat/umcproject/web/controller/RootController.java index 1a9dae4..875eca2 100644 --- a/src/main/java/aromanticcat/umcproject/web/controller/RootController.java +++ b/src/main/java/aromanticcat/umcproject/web/controller/RootController.java @@ -1,8 +1,10 @@ package aromanticcat.umcproject.web.controller; +import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; +@CrossOrigin(origins = "https://dev.nangmancat.shop") @RestController public class RootController { diff --git a/src/main/java/aromanticcat/umcproject/web/controller/SlowLetterController.java b/src/main/java/aromanticcat/umcproject/web/controller/SlowLetterController.java index 4ea52fb..9f06aa9 100644 --- a/src/main/java/aromanticcat/umcproject/web/controller/SlowLetterController.java +++ b/src/main/java/aromanticcat/umcproject/web/controller/SlowLetterController.java @@ -1,21 +1,20 @@ package aromanticcat.umcproject.web.controller; +import aromanticcat.umcproject.apiPayload.ApiResponse; import aromanticcat.umcproject.entity.SlowLetter; import aromanticcat.umcproject.service.slowLetter.SlowLetterService; -import aromanticcat.umcproject.web.dto.Letterbox.LetterResponse; import aromanticcat.umcproject.web.dto.slowLetter.SlowLetterCalResponse; import aromanticcat.umcproject.web.dto.slowLetter.SlowLetterGetResponse; import aromanticcat.umcproject.web.dto.slowLetter.SlowLetterRequest; import aromanticcat.umcproject.web.dto.slowLetter.SlowLetterResponse; import io.swagger.annotations.ApiOperation; -import aromanticcat.umcproject.apiPayload.ApiResponse; import lombok.RequiredArgsConstructor; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.*; -import java.time.LocalDate; import java.util.List; +@CrossOrigin(origins = "https://dev.nangmancat.shop") @RestController @RequiredArgsConstructor @RequestMapping("/slow_letters") diff --git a/src/main/java/aromanticcat/umcproject/web/controller/StoreController.java b/src/main/java/aromanticcat/umcproject/web/controller/StoreController.java index d0568cd..49129f4 100644 --- a/src/main/java/aromanticcat/umcproject/web/controller/StoreController.java +++ b/src/main/java/aromanticcat/umcproject/web/controller/StoreController.java @@ -11,6 +11,7 @@ import java.util.List; +@CrossOrigin(origins = "https://dev.nangmancat.shop") @RestController @RequestMapping("/store") @RequiredArgsConstructor