Тёмный

🚀 New in Spring Framework 6: HTTP Interfaces 

Maciej Walkowiak 🍃 Spring Academy
Подписаться 17 тыс.
Просмотров 52 тыс.
50% 1

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

 

17 окт 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 102   
@Anbu_Sampath
@Anbu_Sampath 2 года назад
Nice feature and good explanation. May be Spring team should extract webClient into separate module and it's own dependency, so we no need bring entire webflux.
@saiupadhyayula4837
@saiupadhyayula4837 2 года назад
I agree with this 🙂
@SpringAcademy
@SpringAcademy 2 года назад
Thanks for feedback!
@rafamilenium2
@rafamilenium2 2 года назад
yeah, it makes a lot of sense
@shiddarthbista2248
@shiddarthbista2248 Год назад
Nostradamus
@fahmydiab
@fahmydiab 2 года назад
I just was going to ask you about the difference with Feign but you already answered in the end Thanks for the video. Really enjoyed it
@SpringAcademy
@SpringAcademy 2 года назад
Thank you!
@junior_java_dev
@junior_java_dev 7 месяцев назад
dzięki wielkie za materiał, tego właśnie szukałem!!!
@luizfernandonoschang8298
@luizfernandonoschang8298 2 года назад
This is awesome. They should also implement java "Optional" as a possible return type on the interface. So we can do something like "todoClient.get(4L).orElseThrow(...)"
@Onulharu
@Onulharu Год назад
it's so amazing and beautiful code style wow... i'm really touched it. thanks for introducing this article.
@ProCoderIO
@ProCoderIO 2 года назад
Dang! That's cool! Didn't know they had added this to Spring Framework 6.
@SpringAcademy
@SpringAcademy 2 года назад
Right? I learned about it on Twitter :)
@ProCoderIO
@ProCoderIO 2 года назад
@@SpringAcademy BTW, the whole flow was nice and smooth. (I took notes!)
@sagarrout007
@sagarrout007 2 года назад
Hi, I would still its bit cumbersome compare to feign client. With Feign client we can declare, annotate and Enable it. Why new http client is not like Open Feign client ? Just curious. Thanks a lot for sharing all the knowledge and I learnt so much from your videoes.
@SpringAcademy
@SpringAcademy 2 года назад
Feign client is definitely more mature. I have no answer for your question but I am looking forward how it evolves. There's still quite a bit of time till 6.0 goes GA. Thanks for feedback!
@szymonstepniak
@szymonstepniak 2 года назад
Great video, Maciej! Short enough and right to the point! Kudos! 👍
@SpringAcademy
@SpringAcademy 2 года назад
Thank you Szymon! I hope one day I'll reach your level of video quality!
@panthonyy
@panthonyy 2 года назад
So glad I found your channel! You're a good teacher and helped me understand Spring a lot better and became a little better at my job with your explanations. Thanks man!
@SpringAcademy
@SpringAcademy 2 года назад
Thanks for feedback!
@renegat-rm
@renegat-rm 2 года назад
Хорошая презентация нового функционала!
@MatthewRobbinsColumbusOhio
@MatthewRobbinsColumbusOhio Год назад
Thank you for the tutorial!
@hattorihanzo8788
@hattorihanzo8788 Год назад
The doppleganger of "Antony Starr". Great video!!!
@rafald5097
@rafald5097 2 года назад
Nice to see you back
@SpringAcademy
@SpringAcademy 2 года назад
Thanks! Wasn't easy to be honest!
@SpringAcademy
@SpringAcademy 2 года назад
Thanks! Wasn't easy to be honest!
@владимирсенцов-р1ю
@владимирсенцов-р1ю 8 месяцев назад
Good explanation thanks.
@Chrizzonator
@Chrizzonator Год назад
will there be an updated video? spring boot 3 is out now *hurray*
@songokan
@songokan 2 года назад
Nice it reminds Retrofit, but today we use OpenApi plugin to generate our controller's contract and client implementation based on that contract
@SpringAcademy
@SpringAcademy 2 года назад
Yes it is indeed same concept to Retrofit and Feign. More about declarative clients in recent talk from Spring IO conference: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-5LNOnVJKW_4.html
@heavelycitizentamil
@heavelycitizentamil 2 года назад
Nice Content. Appreciate your work to spread the knowledge. Keep going. 👌
@SpringAcademy
@SpringAcademy 2 года назад
Thank you! Will do :-)
@Chrizzonator
@Chrizzonator Год назад
Btw. is the WebClient required for creating the factory? In the past we had big issues with it when using blocking mode and multithreaded and moved back to RestTemplate to solve it.
@ataiabdiev2355
@ataiabdiev2355 2 года назад
hello sir .Thank you for your great work. Please make a video about spring basics and spring security. GL
@andrii.kukuruza
@andrii.kukuruza 2 года назад
Nice explanation. Thanks!
@SpringAcademy
@SpringAcademy 2 года назад
Thank you!
@alex283d
@alex283d 2 года назад
Big fan of JpaRepositories generated at runtime, this looks very similar. Does it work with Optional, mapping a 404 to Optional.empty()?
@SpringAcademy
@SpringAcademy 2 года назад
Unfortunately it does not, at least not out of the box. I am experimenting now with handling errors.
@panthonyy
@panthonyy 2 года назад
@@SpringAcademy My man! Looking forward to a new video on that matter!
@misaelpereira9679
@misaelpereira9679 2 года назад
Awesome implementation!
@SpringAcademy
@SpringAcademy 2 года назад
Thanks for feedback!
@dimitricharles9784
@dimitricharles9784 2 года назад
Great video, this is very similar to various http clients like resteasy. Will the annotations like @Path, @Get, @Produces, etc will be compatible with this feature of Spring 6 ?
@skywatcher3718
@skywatcher3718 2 года назад
Nice. I hope it will be a great replacement for feign clients. I also interested in load balanced implementation, but more likely it will be described in documentation.
@SpringAcademy
@SpringAcademy 2 года назад
Yes, there are also few milestones so I guess there's still plenty of time for improvements
@vishalsundararajan1228
@vishalsundararajan1228 2 года назад
I started using feign client knowing that i could override the URL instead of using serviced. I hope the advantage over feign client is the easier upgrade on each spring boot version and integrations with the spring ecosystem
@SpringAcademy
@SpringAcademy 2 года назад
Definitely, as it is baked in into the framework there will be less hassle with maintenance than with any other 3rd party library.
@erorrz
@erorrz 2 года назад
great example, thanks :)
@SpringAcademy
@SpringAcademy 2 года назад
Thank you!
@retrodaredevil
@retrodaredevil 2 года назад
So this is a similar alternative to Retrofit?
@SpringAcademy
@SpringAcademy 2 года назад
Yes, the idea is the same, just native to the framework. I guess it makes it easier for Spring to keep it compatible with spring native and all the observability tools planned for 6.0
@Nico-ly7lh
@Nico-ly7lh 2 месяца назад
How could i set it up to set the base url and auth at runtime?
@СергейНовоселецкий-ж3ч
In Quarkus on my opinion this done in more elegant way
@fjsm41
@fjsm41 2 года назад
Great content! thx
@SpringAcademy
@SpringAcademy 2 года назад
Thank you Felipe!
@neo666fhk
@neo666fhk 2 года назад
May be a dumb question, but what’s the difference to feign?
@SpringAcademy
@SpringAcademy 2 года назад
Not dumb at all! Same concept but built into the framework. I think it will be easier to keep it aligned with Spring Native and observability coming in Spring Framework 6.
@panthonyy
@panthonyy 2 года назад
Spring observability coming in Spring 6? Jeez gotta keep myself more up to date!
@АлександрБугримов-о1е
super )
@SpringAcademy
@SpringAcademy 2 года назад
Thank you!
@Marcot348
@Marcot348 2 года назад
This week I was shocked on how "hard" it is to make a simple get request on java.
@SpringAcademy
@SpringAcademy 2 года назад
With Java 11 HttpClient not so much anymore, but with HttpUrlConnection it's pure madness
@Bstbln
@Bstbln 2 года назад
Same, three weeks ago 😂
@Marcot348
@Marcot348 2 года назад
@@SpringAcademy oh, thanks for the tip. I was using resttemplate to do it. HttpClient is much easier
@SpringAcademy
@SpringAcademy 2 года назад
@@Marcot348 in spring world, to get proper logging, metrics and traces you should go with RestTemplate or WebClient. Only if you don't need any of these Java built in http client is fine
@evgenyamorozov
@evgenyamorozov 2 года назад
Try feign. It looks even easier, than this new spring feature.
@3hpdreamofme
@3hpdreamofme 2 года назад
I don't see any difference with @FeignClient. What is the difference, except in other annotations?
@SpringAcademy
@SpringAcademy 2 года назад
The most important one is support for reactive types. Other than that, since it is baked into the framework, we can expect better compatibility with all the other framework features, like AOT, logging, tracing, metrics.
@kappaj01
@kappaj01 2 года назад
Super cool - like!!
@SpringAcademy
@SpringAcademy 2 года назад
Thank you!
@momedalhouma14
@momedalhouma14 2 года назад
Hello, is it not like FeignClient? what's the difference?
@SpringAcademy
@SpringAcademy 2 года назад
It is! It's baked into the framework, no need to rely on 3rd party dependency and i believe better compatibility with AOT
@TheDrezir
@TheDrezir 2 года назад
This is nice, It is similar to openfeign
@SpringAcademy
@SpringAcademy 2 года назад
Indeed it's definitely not a serious innovation, but perhaps will integrate better with the spring stack than 3rd party libraries.
@Javatician
@Javatician 2 года назад
Nice video .But the amount of code you have to write to load todos is overkill compared to JavaScript
@randomlee101
@randomlee101 2 года назад
This feature just moved Springboot closer to Express JS in terms of simplicity
@五五开-d2w
@五五开-d2w 2 года назад
seems like feign
@WesleyChetty-c8c
@WesleyChetty-c8c 7 месяцев назад
What if need to use auth
@BorisGligorijevic
@BorisGligorijevic 2 года назад
Hmmm, feign client?
@xuweijay
@xuweijay 2 года назад
just like Feign
@evgenyamorozov
@evgenyamorozov 2 года назад
I hate it!.. Don't get me wrong, the video is great, the explanation is awesome. But the subject... most of this autogeneration, autoconfiguration, autoeverything... it doesn't actually increase speed of new features delivery to production and it doesn't reduce number of bugs that people make along the process. In my opinion this sort of autogeneration just adds tens of thousands lines of codes with very little value. And of course I understand developers who work hard to deliver such a feature into spring - it's cool. And I agree with this. It is indeed cool to work on it. But nevertheless, it does more harm, than value, when used as a tool.
@SpringAcademy
@SpringAcademy 2 года назад
I can understand the sentiment - I wasn't a big fan of Feign, hope this will work better and more predictable. Luckily lower level clients are not going anywhere so there will be a different level of abstraction for everyone. Thanks for feedback and your thoughts!
@MRoose
@MRoose 2 года назад
Господи, как интересно. Правада без видео-переводчика от Яндекс так ничего и не понял бы ;)
@Vitalij_R2
@Vitalij_R2 Год назад
Не дивно що без костелів ніяк
@oleksiibuheria932
@oleksiibuheria932 2 года назад
Its disappointing they have gone this way . Because it will be much better to provide controller interface. I know there is another tool for this, but expected something like this from spring team.
@vaishnavmhetre9061
@vaishnavmhetre9061 2 года назад
Instead of being baked into spring. This should be a dependency addon.
@SpringAcademy
@SpringAcademy 2 года назад
This used to be a dependency add on as OpenFeign or Retrofit, but there are benefits of having this as a part of the framework.
@igomesigomes
@igomesigomes 2 года назад
Nice... but interestingly Java is still too much verbose for so simple things that you can write in way less lines of codes to do even more. Amazing! Well, at least it's improving.
@panthonyy
@panthonyy 2 года назад
I agree, but still think that Java verbosity is a feature in a sense. I work in a big corp with code that has been running in Prod for more than 20 years, if that code wasn't verbose enough, it would be almost impossible for new programmers to understand what's happening in it 😅
@SpringAcademy
@SpringAcademy 2 года назад
Java is indeed verbose but it's not necessarily a bad thing. Records is a very good step forward, but ideally we would get rid of more regular boilerplate.
@igomesigomes
@igomesigomes 2 года назад
​@@SpringAcademy I understand, but let's agree to disagree, shall we? Because, in a practical point of view, in fact it is a bad thing: the more you write *unecessary* code, the highest the cost to maintain it later and also the highest the probability of bugs will be. So, if you can remove these unecessary code (that is there just to be verbose the way Java likes to be), why not?
@igomesigomes
@igomesigomes 2 года назад
@@panthonyy I understand what you say and I totally agree, but that's not what I am talking about. Notice that I was mentionning *unecessary* code that could be removed by a simple and more well-designed framework architecture (like many others that are popular in other languages) that balances the use of convention and the explicit code you still have to write. But I believe that would go against the Java-nature of things, that is to write, write, write and more write (instead of just 4.times("write")). :-) Greetings!
@IIIxwaveIII
@IIIxwaveIII 2 года назад
Sounds a lot like micro profile rest client...
@SpringAcademy
@SpringAcademy 2 года назад
Indeed it isn't a revolution but it also wasn't meant to be! More about why: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-5LNOnVJKW_4.html
@rsobies
@rsobies Год назад
just like feign client
@stellama2
@stellama2 2 года назад
copy to CXF Client
@maksimmuruev423
@maksimmuruev423 8 месяцев назад
this is not going to work with real project
@rhxahob2763
@rhxahob2763 2 года назад
Zoomers invented Feign
@TroenderTass
@TroenderTass 2 года назад
Just watching 30 seconds midt way through the video, and all im thinking is yet another "magic" abstraction to do very simple and basic things to a magic trick. Creating http-controllers/routers is one of the most basic things, why the hell do we need http interfaces. I swear to god these engineers keep adding shit to their libraries just cause they got nothing real to do.
@panthonyy
@panthonyy 2 года назад
What is it about simplifying repetitive daily tasks is not real?
@TroenderTass
@TroenderTass 2 года назад
@@panthonyy It is not simplyfying anything. It creates a new pattern of complexity and new pages of documentation. No there is a new way of doing the same shit, what is good about that?
@SpringAcademy
@SpringAcademy 2 года назад
This is not for routers or Controllers but HTTP clients. Perhaps it's good idea to watch more than random 30 seconds 😉
@rat6505
@rat6505 Год назад
How do I encrypt request body?
Далее
🚀 New in Spring Framework 6.1: RestClient
13:16
Просмотров 10 тыс.
Why use Type and not Interface in TypeScript
14:12
Просмотров 210 тыс.
СТАЛ КВАДРОБЕРОМ
00:34
Просмотров 112 тыс.
Microservices are Technical Debt
31:59
Просмотров 525 тыс.
HTTP 1 Vs HTTP 2 Vs HTTP 3!
7:37
Просмотров 232 тыс.
Spring Boot Rest Client Interceptors
14:00
Просмотров 10 тыс.
Keynote: Introducing Spring Framework 6
1:03:04
Просмотров 37 тыс.
A First Look at the new Rest Client in Spring Boot 3.2
18:03
The only Cloud services you actually need to know
17:17
What does larger scale software development look like?
24:15