How to consume external RestAPI in Springboot using RestTemplate

preview_player
Показать описание
This tutorial will walk you through the steps of consuming the external rest API in Springboot.

Learn how to consume external REST API using RestTemplate in springboot.
Also we will see how we can use ObjectMapper for RestTemplate.

Countries and city API Link below

All kind of API related to Countries and city Link below

Springboot Tutorial Series

Stream API in Java 8
Рекомендации по теме
Комментарии
Автор

Hey thanks a lot I have one question I am new to java I understood the flow but can you please tell me what is the use of lambda operator here and reference type and why you used get(0) index.
Thanks you once again.

ctwbcdz
Автор

all this objectMapper, RestTemplate builder and stream operation should be implemented in Service package instead of Controller .

neojai
Автор

When I'm hitting rest api in postman it's showing json data but in my application it's passing null values.. i did double check var names in pojo class all are correct

suruchigupta
Автор

Can you explain what DataResponse & ObjectMapper class is doing in ur code?

kumarabhishek
Автор

Hi, I have tried this approach but I am getting .

seemabangar