260609_03_ENH: 단축 url get메소드로 변경

This commit is contained in:
2026-06-09 17:50:24 +09:00
parent de76bdbe75
commit 3a198732cd

View File

@@ -6,8 +6,8 @@ import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.util.MultiValueMap; import org.springframework.util.MultiValueMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
@@ -19,7 +19,7 @@ import org.springframework.web.util.UriComponentsBuilder;
@Tag(name = "ShortUrl", description = "단축 URL API") @Tag(name = "ShortUrl", description = "단축 URL API")
public class ShortUrlController { public class ShortUrlController {
@PostMapping("/redirect/{shortKey}") @GetMapping("/redirect/{shortKey}")
public ResponseEntity<Void> redirectShortUrl( public ResponseEntity<Void> redirectShortUrl(
@PathVariable String shortKey, @PathVariable String shortKey,
@RequestParam MultiValueMap<String, String> params @RequestParam MultiValueMap<String, String> params