Configuration Vs Component In Spring #springplatform #coding #javaframework #springproject

preview_player
Показать описание

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

so in simple terms whatever the beans Config annotation will create, will be of singelton scope.
While creating bean using @Bean annotation in component annotation wont be the same scope.

And this makes sense as config value should be same throughout the application level, hence having singelton nature is useful in config case which is not true for services or controller type classes.

Mukesh-bfxt
Автор

At the end provide definition so that we can use that in our interview

Sumeshkumarback
Автор

ProxyBeanMethods disables CGLIB over the config class. Calling @Bean methods within that class effectively bypasses the proxy and you will generate whatever the method is designed to create and NOT return the managed Singleton. @Bean in @Component is absolutely a singleton by default.

buksvdl
Автор

@Component also creates bean for the class by default as Singleton. Inside @Configuration annotated class also bean created as Singleton.

santhosh
Автор

@component is also singleton by default

unmeshchougule
Автор

these libarary or tool based questions are not worth .Hld lld and other things logic are important .Spring boot is just a framework your core should be strong other than that everything is available over internet

gauravpandey
Автор

Bro explain in Hindi i don't understand

SITIANS_collegelife
visit shbcf.ru