똑같은 삽질은 2번 하지 말자

Spring Boot 개념다지기 No.19(RestClient) 본문

Spring/Spring Boot

Spring Boot 개념다지기 No.19(RestClient)

곽빵 2020. 5. 6. 13:50

Spring RestClient

RestTemplate

 

Integration

As a lightweight container, Spring is often considered an EJB replacement. We do believe that for many, if not most, applications and use cases, Spring, as a container, combined with its rich supporting functionality in the area of transactions, ORM and JD

docs.spring.io

 WebClient

 

Web on Reactive Stack

The original web framework included in the Spring Framework, Spring Web MVC, was purpose-built for the Servlet API and Servlet containers. The reactive-stack web framework, Spring WebFlux, was added later in version 5.0. It is fully non-blocking, supports

docs.spring.io

 

Customizing

RestTemplate

  • 기본으로 java.net.HttpURLConnection 사용.
  • 커스터마이징
    • 로컬 커스터마이징
    • 글로벌 커스터마이징
      • RestTemplateCustomizer
      • 빈 재정의

 WebClient

  • 기본으로 Reactor Netty의 HTTP 클라이언트 사용.
  • 커스터마이징
    • 로컬 커스터마이징
    • 글로벌 커스터마이징
      • WebClientCustomizer
      • 빈 재정의

내장웹서버, jar패키징해서 실행, SpringBoot의 핵심기능은 어디서든 사용하는

Comments