Тёмный

Spring @Configuration Annotation - What are Proxy Bean Methods? 

Dan Vega
Подписаться 62 тыс.
Просмотров 19 тыс.
50% 1

In this tutorial, you will learn about a property of the @Configuration annotation proxyBeanMethods. This property is set to true by default but as you will learn there are situations where you might want to set this to false.
🔗Resources & Links mentioned in this video:
👋🏻Connect with me:
Website: www.danvega.dev
Twitter: / therealdanvega
Github: github.com/dan...
LinkedIn: / danvega
Newsletter: www.danvega.de...
SUBSCRIBE TO MY CHANNEL: bit.ly/2re4GH0 ❤️

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

 

14 окт 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 34   
@mlensment
@mlensment Год назад
Great insight! Even though we cannot make this behaviour default, it *feels* like it should be default. Personally I’m against any “magic” in code. I like things concise and transparent and I don’t mind writing a little more code instead of using the “magic.”
@joachimdietl6737
@joachimdietl6737 28 дней назад
Hello Dan great video like always! Thanks buddy
@abedalrawas2656
@abedalrawas2656 Год назад
I always wondered about this but didn't dig much. Thanks for making it clear!
@MisterJuviva
@MisterJuviva Год назад
The explanation is clear. You made a small typing error in the description @Configuration :) Thank you for the tutorial !
@DanVega
@DanVega Год назад
Sorry for that, thanks for the heads up!
@Anbu_Sampath
@Anbu_Sampath Год назад
It's really useful information. FYI - Spring uses its own folk of CGLIB within spring-core.
@TsimurKatkouski-o3k
@TsimurKatkouski-o3k 7 месяцев назад
Super clear now. Thank you a lot!
@replicant9611
@replicant9611 Год назад
So cool, thanks for the video! So, what was the decision to introduce the proxies in the past? Is it considered to be a bad practice now? What are the situations when we cannot avoid proxies?
@eniolaibitomihi2306
@eniolaibitomihi2306 Год назад
Thanks for this tutorial Dan
@kensaitakeso
@kensaitakeso Год назад
thanks! great tutorial. Dan why you don't ever use Lombok in your videos? Is it for a better understanding of what's going on? Or it is bcoz some annotations don't work well with Spring? (IDEA sometimes suggests me avoid @Data for entities)
@DanVega
@DanVega Год назад
With Records I don't really have a use for Lombok these days. Also I teach a lot of beginner material and I like to avoid having to point out something else in the middle of a tutorial If I can avoid it.
@ShaileshDagar
@ShaileshDagar Год назад
A nice & concise tutorial.
@urisimchoni3936
@urisimchoni3936 Год назад
One thing I don't get - The CGLib proxy installs a wrapper around the conf class, but doesn't modify the class itself (or so we're told in the Spring-AOP documentation, maybe I'm mixing two use cases for CGLib). So when we call restTemplate() from runService(), how does Spring make us go through the proxy (in comparison, the AOP docs specifically indicate that calls from one method of the class to another aren't being proxied)?
@mouadmuslim
@mouadmuslim 3 месяца назад
You deserve the thumb up
@shoaibd5006
@shoaibd5006 Год назад
Thanks for the cool insight!!!. If possible can you come up with @Transactional annotation specially with R2DBC. Thanks once again.
@marouaniAymen
@marouaniAymen Год назад
Thanks, I learned something new. But I noticed that the appearance of IntelliJ is different from the classic, is it a new version or a theme ?
@nico-s29
@nico-s29 Год назад
I am not so far into the Video rn but I am very sure you mean the new ui which can be activated in the settings when you use the newest intellij version
@IvanRandomDude
@IvanRandomDude Год назад
Maybe proxyBeanMethods should be set to false by default and then give us warning to enable it if we use bean methods inside config class. If in fact it can improve performance....
@DanVega
@DanVega Год назад
The problem is we can't just flip that switch because it wouldn't be backwards compatible. I think its good to understand what's going on here and make an informed decision in your code.
@vipinkoul595
@vipinkoul595 10 месяцев назад
Nice tutorial. As you were mentioning of "native..", could you please elaborate what does it mean in the context of this tutorial or where it's applicable ? what does it actually mean, like by flipping flag proxyBeanMethods to false does it mean the "code" would run natively, what does it mean?
@zombi1034
@zombi1034 7 месяцев назад
I think he is talking about GraalVM Native Image Support, which turns your java application into a natively compiled system executable.
@Airforce_inter
@Airforce_inter 6 месяцев назад
Why don't u use the intellij itself to initialize an spring boot project? It also adds dependencies automatically. Everything in intelij 🎉
@DanVega
@DanVega 6 месяцев назад
I use start.spring.io because not everyone is using IntelliJ. When I am working on my projects and not recording tutorials I do use it
@punekarinwinnipeg214
@punekarinwinnipeg214 Год назад
Can you make a video where a user cannot view and edit information of another user even when they have same role and authority using spring security and a relational database … I looked at many RU-vid channels but they also haven’t showed it .. Can you please make a video ? Thank you so very much !
@abneruriarte1441
@abneruriarte1441 3 месяца назад
how do you do to have a fancy colored terminal in intellij? mine is just plane black & white :(
@ravikumarsa8512
@ravikumarsa8512 Год назад
Hello sir Can you please make video about How to send SMS using Java spring boot also mention which is community or paid version thanks
@ravikumarsa8512
@ravikumarsa8512 Год назад
How to use MQTT broker publish and subscribe in springboot Java & connection set up ?
@TheGuroguro12
@TheGuroguro12 Год назад
thank u
@null_user123
@null_user123 2 месяца назад
gr8
@jopadjr
@jopadjr Год назад
74th...Thanks Dan
@musaauysal
@musaauysal Год назад
what is your IDE name
@nico-s29
@nico-s29 Год назад
IntelliJ idea ultimate with New ui activated
@JamesStansell
@JamesStansell Год назад
Question about @Bean public methods. Does IntelliJ not offer to remove the public modifier? Both Spring Tool Suite and the OpenRewrite best practices recipe will remove it, for reference: org.openrewrite.java.spring.BeanMethodsNotPublic Remove public modifier from @Bean methods. They no longer have to be public visibility to be usable by Spring.
Далее
САМАЯ ТУПАЯ СМЕРТЬ / ЧЕРНЕЦ
1:04:43
5 Common Mistakes Spring Developers Make
18:06
Просмотров 19 тыс.
Understanding Proxy
12:12
Просмотров 4,4 тыс.
Spring Framework. Proxy
17:09
Просмотров 3 тыс.