Spring @Configuration Annotation - What are Proxy Bean Methods?

preview_player
Показать описание
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:

Рекомендации по теме
Комментарии
Автор

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.”

mlensment
Автор

I always wondered about this but didn't dig much. Thanks for making it clear!

abedalrawas
Автор

The explanation is clear.
You made a small typing error in the description @Configuration :)
Thank you for the tutorial !

MisterJuviva
Автор

It's really useful information. FYI - Spring uses its own folk of CGLIB within spring-core.

Anbu_Sampath
Автор

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?

replicant
Автор

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)?

urisimchoni
Автор

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)

kensaitakeso
Автор

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....

IvanRandomDude
Автор

Thanks for the cool insight!!!. If possible can you come up with @Transactional annotation specially with R2DBC. Thanks once again.

shoaibd
Автор

Why don't u use the intellij itself to initialize an spring boot project? It also adds dependencies automatically. Everything in intelij 🎉

Airforce_inter
Автор

how do you do to have a fancy colored terminal in intellij? mine is just plane black & white :(

abneruriarte
Автор

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 YouTube channels but they also haven’t showed it .. Can you please make a video ? Thank you so very much !

punekarinwinnipeg
Автор

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 ?

marouaniAymen
Автор

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?

vipinkoul
Автор

How to use MQTT broker publish and subscribe in springboot Java & connection set up ?

ravikumarsa
Автор

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

ravikumarsa
Автор

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:

Remove public modifier from @Bean methods. They no longer have to be public visibility to be usable by Spring.

JamesStansell