sy_develop_note

  • 홈
  • 태그
  • 방명록

resttemplate 2

[Spring] WebClient vs RestTemplate 차이점 정리

평소 외부 API나 클라이언트와 연동할 때 WebClient와 RestTemplate을 자주 사용해 왔습니다.하지만 문득 "정확하게 어떤 차이가 있고, 언제 어떤 걸 써야 할까?"라는 생각이 들어 이번 기회에 정리해보려고 합니다.☁️ 🔍 RestTemplate이란?RestTemplate은 Spring 3부터 지원된 동기 방식의 HTTP 클라이언트입니다.가장 널리 쓰이는 getForObject(), postForEntity() 같은 메서드들을 통해 API를 쉽게 호출할 수 있어, 직관적이고 익숙한 방식이에요!RestTemplate restTemplate = new RestTemplate();String response = restTemplate.getForObject("https://api.exampl..

Backend/Spring 2025.06.29

[Spring] RestTemplate에서 PATCH가 안 된다면? 원인과 해결 방법 정리

RestTemplate를 사용하던 도중 PATCH 메서드를 호출할 때 아래와 같은 오류가 발생했습니다. 👀org.springframework.web.client.ResourceAccessException: I/O error on PATCH request for “https://api.example.com/resource/1”: Invalid HTTP method: PATCH; nested exception is java.net.ProtocolException: Invalid HTTP method: PATCH나는 위와 같은 오류를 경험했지만, PATCH 요청을 보낼 때 다음과 같은 다른 오류가 발생할 수도 있다고 합니다.org.springframework.web.client.HttpClientErrorE..

Backend/Spring 2025.03.01
이전
1
다음
더보기
프로필사진

sy_develop_note

  • 분류 전체보기
    • Backend
      • Spring
      • Java
      • TypeScript
      • TestCode
      • IntelliJ
    • Data
      • Redis
      • Kafka
      • DataBase
      • MySQL
      • MongoDB
      • PostgreSQL
    • Architecture
      • ContainerTech
      • DesignPatterns
    • Infra
      • Git
      • Linux
    • Web
      • HTTP
    • AI
      • N8N
    • Algorithm
      • CodingTest
    • 개발끄적

Tag

타입스크립트, java 코테 문제 풀이, 백준, MySQL, Git, 오블완, 코테 문제 풀이, 자바, typescript, Spring, Java, Baekjoon, 만들면서 배우는 클린 아키텍처, programmers, 프로그래머스, mongoDB, 티스토리챌린지, 클린 아키텍처, 깃, 프로그래머스 문제 풀이,

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

페이스북 트위터 플러그인

  • Facebook
  • Twitter

Archives

Calendar

«   2025/12   »
일 월 화 수 목 금 토
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31

방문자수Total

  • Today :
  • Yesterday :

Copyright © AXZ Corp. All rights reserved.

  • Github

티스토리툴바