Spring Bean using Annotation - Coding Step By Step

preview_player
Показать описание
In this video, It shows you how to do configuration using Annotation in Spring.

If you're not familiar with @Component-based annotation, check this:

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

Sorry, I forgot to show Bean Scope in this video. Add @Scope("prototype") annotation on top of the @Component annotated class. The behavior is the same as you use other configuration ways.

MissXing
Автор

Thanks a lot Tina, I really like your tutorials

josephkalema
Автор

apparently if your component class' name starts with two or more uppercase letters then its bean name is the same as the name of the class, e.g. "SMSService" remains "SMSService", "ITService" would remain "ITService", "UService" would remain "UService", but "MyService" would be changed to "myService", and "TopSERVICE" would be changed to "topSERVICE", etc.

michalbotor
Автор

thanks for this great video, i wish you all the best

mohyieddinenahi
Автор

Hi.
Tnx for you videos.
I have a problem with @ComponentScan.
This annotation cannot find my Class . I think its something wrong with packages.
I will be glad you help me.

amirhosseinnouri