Dependency Injection in Spring Boot
new keyword.Auto Wiring
@Autowired annotation to automatically connect dependencies.Types of Dependency Injection
@Autowired directly on fields.Loose Coupling with Interfaces
Computer) to allow for flexible dependency management.Laptop and Desktop).Handling Multiple Implementations
@Primary and @Qualifier annotations to resolve ambiguity.@Primary to indicate a preferred bean or @Qualifier to specify which bean to use.@Autowired, @Primary, and @Qualifier to effectively manage dependencies.This video provides a comprehensive overview of auto wiring in Spring Boot, emphasizing the importance of dependency management and best practices for building robust applications.
0:00 so now we know how exactly your spring boot helps you with the dependency injection but now let's add one more layer so there's a concept called Auto wiring and in this video let's try to focus on auto wiring with the help of one more layer Target for this video is 250 comments now which layer I'm talking about now just for example let's say when you talk about developers of course as a developer I need a machine to work with it can be a laptop desktop doesn't matter I just want a machine to work with so what I can do is I can work on the project but while doing that maybe I
0:33 also want to uh compile the code so maybe I want to call a method called compile uh maybe I want to call the method uh debug so we got all these methods to work with and of course I can't do this in my mind we do that when you want to do a dry compilation but technically if you want to really build a project you need to have a machine where you can compile and debug so in order to call this methods I need a class where I can Define this this and that class is your laptop class so let
🔒 The full, searchable transcript is available with Pro.