Spring | Autowire | Dependency Injection | Spring Boot

Java

Video is ready, Click Here to View ×


Practical implementation of Java Spring Dependency Injection and Autowire

Join our Spring Live Course : https://goo.gl/UN7R6C

In this video we will see :
– Example of Spring Dependency Injection and Autowire
– Create Spring Boot project
– STS
– Creating simple POJO class
– Object creation
– Configurable Application Context object
– getBean method
– Spring container
– JVM
– Spring bean
– Singleton scope
– Prototype scope
– Singleton Design Pattern
– Null pointer exception
– Object…

49 thoughts on “Spring | Autowire | Dependency Injection | Spring Boot

  1. Good explanation of Autowiring concept. I am facing the autowiring issues when I have autowiring classes in a different package structure. Any thoughts of resolutions ?
    Also, during the next videos, we can can clearly create different packages and show such concepts, then it would make it lot realistic.

  2. Hello Navin, is it required to have both @Autowired and @Qualifier. if I'm removing @Autowired its not working. In case @Autowired is working without the @Qualifier then why to use @Qualifier, could you please clear my doubt.

  3. Thanks for good explanaition and loved the drawing you did in between coding. That was perfect in my mind. I would however recommend not using field injection and rather use constructor or setter injection. @Autowired above setLaptop(…) would be better in this case. Here is an article describing three ways of dependency injection for all viewers interesting in Spring and dependency injection. https://www.logicbig.com/tutorials/spring-framework/spring-core/types-of-dependency-injection.html

  4. Thank you! Excellent explanation.
    I have a bit weird question :))

    What will be a name of instances in container, if 2 instances were created by PROTOTYPE SCOPE. Actually for Laptop class name in the container is "laptop", so what will be the second instance name?

Leave a Reply

Your email address will not be published. Required fields are marked *