Тёмный

RestClient in Spring Boot 3 - Builder, Timeout, Interceptor, RequestFactory 

Linh Vu
Подписаться 1,7 тыс.
Просмотров 936
50% 1

In today’s video, we’re going to explore RestClient from Spring Framework 6, Spring Boot 3. Recently, I answered a question
from Reddit, asking if is there any resource to get Production experience, from my thought, we can start getting familiar with Production depending on how much we understand about our system and the tools/components we’re using. System side can be hard for junior level, but I think understanding tools/components is the simplest and must-go way to get started in gaining Production experience at any level.
Github: github.com/nlinhvu/rest-clien...
You Might Already Know Series: • You Might Already Know
References:
RestClient::Spring Framework 6: docs.spring.io/spring-framewo...
RestClient::Spring Boot 3: docs.spring.io/spring-boot/do...
(00:00): Introduction
(00:44): Practice when using RestClient
(05:08): Create a RestClient
(09:00): Set Connection/Response Timeout through RequestFactory
(13:30): RestClient Interceptors

Наука

Опубликовано:

 

26 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 13   
@jurgen5557
@jurgen5557 3 месяца назад
Again, my friend, such great content! Unlike many other channels, you manage to present rather advanced Spring topics in a very clear way, making it easy and a pleasure to follow. I repeat myself, but each vid I learn something new, though I know myself a thing or two here :-). My highlight here were the ClientRequestFactories and its Spring support as Settings class. Did not know about it..
@linhvudev
@linhvudev 3 месяца назад
Thanks again, as always, I really appreciate you leaving your comment!
@debbh274
@debbh274 2 месяца назад
Still a fan of your open telemetry series. Awesome work. And great examples.
@linhvudev
@linhvudev 2 месяца назад
Really appreciate your nice words, many thanks!
@nnh1005
@nnh1005 3 месяца назад
Tất cả video trên kênh rất chất lượng ạ, cảm ơn a ❤
@linhvudev
@linhvudev 3 месяца назад
thank you very much 😊😊!
@matsior_
@matsior_ 2 месяца назад
Nice video! Do you think interceptors should be registered as spring beans? Or just creating new one when we need as in yours example?
@linhvudev
@linhvudev 2 месяца назад
Nice question! It simply depends on your interceptor can be shared across multiple RestClient instances (if you have multiple RestClient instances). For example: all RestClient instances intercept a request to add a same headers to downstream services => you can register 1 interceptor bean and inject it to all instances. But if your interceptor behaves different for every services, new Interceptor(String hiServiceToken) for HiService, new Interceptor(String helloServiceToken) for HelloService => you need to create 1 interceptor instance for 1 RestClient instance. Avoid making stateful interceptors, it's a different story, anyway, yeah, understand what you're using.
@matsior_
@matsior_ 2 месяца назад
Do you think interceptor is good place to call some SSO? When we need additional authorization in request
@linhvudev
@linhvudev 2 месяца назад
@@matsior_ yes, it absolutely is, RestClient.interceptor is WebClient.filter in Reactive context. In Reactive, you'll have ServerOAuth2AuthorizedClientExchangeFilterFunction is already supported. But the similar thing in RestClient is being developed, an issue was raised nearly a year ago github.com/spring-projects/spring-security/issues/13588, an draft version is also discussed there, you could take a look.
@kam1234554321
@kam1234554321 13 дней назад
Sorry but after 3 minutes I was unable to finish the video. It's so diffucult to follow when you are skipping/changing letters in word like "Servid" instead of "Service" or "lient" instead of "client" (and you keep repeating these words many many times) or other like "lelved" instead of "level", "experiend" instead of "experience". I'm not sure why but you were able to pronounce "c" letter in "documentation" (and you are able to pronounce "s" letter as well) but you change it in all other words. I had to rewind the video few times and listen to it again but after 5 minutes I realized I'm still 3 minutes into the video. I believe this video is very informative but even on the weekend in my free time I don't have 1h to watch this video (with rewinding every 10 seconds because I didn't get what you are saying). Before anyone says "chill dude, it's his accent, he is not a native speaker". Well, me too as you can notice by reading this comment (I bet I did some mistakes) but you were able to follow my message till this sentence which means it's good enough to understand me. It's a honest opinion about the video. He can try to improve next time and someone had to say it. Cheers
Далее
Flo Rida - Whistle НА РУССКОМ 😂🔥
00:29
Просмотров 904 тыс.
Spring Boot Rest Client Interceptors
14:00
Просмотров 9 тыс.
🚀 New in Spring Framework 6.1: RestClient
13:16
Просмотров 10 тыс.
5 Common Mistakes Spring Developers Make
18:06
Просмотров 16 тыс.
7 HIDDEN Spring Boot Features You Need To Enable NOW!
12:32
#engineering #diy #amazing #electronic #fyp
0:59
Просмотров 2,1 млн
ЗАБЫТЫЙ IPHONE 😳
0:31
Просмотров 12 тыс.