Spring & Spring Boot Annotations Series - #2 - @Autowired Annotation

preview_player
Показать описание
Hi, welcome to Spring & Spring Boot Annotations Series. In this video, we will learn how to use @Autowired annotation to inject the bean automatically.

The @Autowired annotation is used in constructor injection, setter injection, and field injection

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

Thanks buddy. Don't stop. Keep working in educating the techies. Best wishes.

Abhishekaditya
Автор

cant thank you enough for those videos! its really saving me! 💗💗

manux
Автор

Amazing series Sir Thank you ❤️🙏
Sir I would request you please bring one paid course from scratch spring boot+reactJS fullstack real time level application.. awaited course 🙏

Vithal_Nivargi
Автор

great explanation, but is it me only who find Spring difficult?

dianamirlanbekova
Автор

Which one do we need to prefer ?

Do we have any specific usecase for these three ways or all this works the same ?

Thanks

skv
Автор

Which one is recommended to use for inject beans setter injection ? constructor injection ? or field injection.

when which one is use please explain to me. so I can use based on your explaination.

BhushanRajesh
Автор

Explanation is good but pls go a bit slowly
U are typing very fast and selecting options very quick which makes it a bit confusing to understand

bureddyprashanthreddy
Автор

@Java Guides How to do autowiring based on condition. Let say here in below code if there is one variable choice if choice =1 then I want Samsung class injected if choice =2 then Redmi if choice =3 then Apple.

. class AppService
{
@Autowire
Mobile mobile;
}

class Samsung implements Mobile{

getProperties()
{
println("Memory: 500GB", "RAM :32GB", "color": Golden)
}
}

class Redmi implements Mobile{

getProperties()
{
println("Memory: 250GB", "RAM" :32GB", "color": Orange)
}
}

class Apple implements Mobile{

getProperties()
{
println("Memory: 1TB", "RAM" :32GB", "color": pink)
}
}

stuti