Caused by: java.lang.IllegalStateException: Body parameters cannot be used with form parameters.
수정전
@FeignClient(name = "comment-client", url = "http://localhost:8090/back/posts/{postId}/comments")
public interface CommentClient {
@GetMapping
ResponseEntity<List<GetCommentResponse>> getCommentsByPostId(@PathVariable Long postId);
@PostMapping
ResponseEntity<Void> createComment(@PathVariable Long postId, @RequestBody CreateCommentRequest request);
@PutMapping("/{commentId}")
ResponseEntity<Void> updateComment(@PathVariable Long postId, @PathVariable Long commentId,
@RequestBody UpdateCommentRequest request);
@DeleteMapping("/{commentId}")
ResponseEntity<Void> deleteComment(@PathVariable Long postId, @PathVariable Long commentId);
}
수정후
@FeignClient(name = "comment-client", url = "http://localhost:8090/back/posts")
public interface CommentClient {
@GetMapping("/{postId}/comments")
ResponseEntity<List<GetCommentResponse>> getCommentsByPostId(@PathVariable Long postId);
@PostMapping("/{postId}/comments")
ResponseEntity<Void> createComment(@PathVariable Long postId, @RequestBody CreateCommentRequest request);
@PutMapping("/{postId}/comments/{commentId}")
ResponseEntity<Void> updateComment(@PathVariable Long postId, @PathVariable Long commentId,
@RequestBody UpdateCommentRequest request);
@DeleteMapping("/{postId}/comments/{commentId}")
ResponseEntity<Void> deleteComment(@PathVariable Long postId, @PathVariable Long commentId);
}