Комментарии:
Thanks sir! I respected your explanation
ОтветитьMethods with capital letters... the level of degeneration our society is reaching is alarming.
Anyway, good tutorial!
Thanks for explaining this rather simply, but I think the last part of the video counters the use of DI completely. If you use an abstraction in a class but you need need to provide a qualifier with it that matches the one of the implementation you want then it basically is equivalent as new-ing the implementation up in the class directly. Your class is now directly tied to the implementation through its qualifier which is precisely what we try to avoid with DI and IoC. The class shouldn't be responsible of this, it should be configured elsewhere.
ОтветитьI still don't understand why this is better. "Hey look, we're doing something that will save you one line of code...minus the 2 lines of annotations it adds, but every once in a while it'll save you two seconds.....just forget about the 5 days you've wasted trying to figure out how to structure your program when your normal Java object constructors that perform required initialization of objects fire off multiple times for some unknown reason." I really wish people would stop "saving me time". :D I like how easily I can spit out code to a web server using the controller, but this stuff along with normal java event handling not working and multithreading being done differently...I feel like I'm wasting my life with all the "time savings."
Ответитьu r just awesome with the examples
Ответитьdude.... you were doing so well, but totally missed the climax. There's no difference in your story between DI and explicitly instantiating one class or the other. You're misleading the noobs...
ОтветитьThank you, cleared things for me.
ОтветитьBest Video on Dependency Injection. TY
ОтветитьGreat video ! Solved a lot of my struggles with dependency injection.
ОтветитьUse lombok RequiredArgsConstructor and declare dependencies as private final
Ответитьthe interface does not have to be a Component
Ответитьthanks
ОтветитьThis is very helpful! Thank you
ОтветитьReally good!! Thx a lot.
Stay safe.
I don't believe you have explained what happens at the background properly.
ОтветитьThis is counterintuitive. Why do you decorate a field with @Autowired and then assign a value to it in the constructor anyway? If it should be autowired then why do you wire it yourself? Also I wouldn't call wireing a field dependency-injection. It's rather dependency-hacking. How would you override this for testing when it's virtually a hardcoded dependency?
ОтветитьTerrible explanation tbh. Showing a stackoverflow post instead of providing some basics? 5 minutes into the video and nothing related to dependency injection?
ОтветитьAm I the only one who finds it irritating that he is starting his method names in capital letters?
ОтветитьVery good explanations for Dependency Injection in Spring Boot. thanks
Ответитьgood, helped me a lot.
Ответитьuseless
ОтветитьI still have no clue how is that useful? doesn't that still instantiate a object of textwriter?(maybe not by your hand but I'm sure it will be instantiate in the background.
Ответитьgood tutorial
ОтветитьHey Erik, what do i do if i have a Component that has a parameter in its constructor? For example a String. How can i account for this paramter in my RestController class when i AutoWire the Component?
ОтветитьAwesome explanation of dependency Injection! Ultimately I got some source where explanation is clear without confusion! Thank you.
ОтветитьCaused by: java.lang.ClassNotFoundException: org.springframework.boot.context.event.ApplicationStartingEvent
why i getting this error?
great tutorial
ОтветитьHey Erik this is just amazing. Can you please do a video on the getBeans method?
Ответитьwhere are the next parts:? What do you mean by @Component?
ОтветитьThank you for this! Makes so much more sense now!
ОтветитьThank you I found this very useful!
ОтветитьThis video was gold! I was beginning to think I would never understand autowiring. Thank you!
ОтветитьIt was difficult for me wrapping my head around using the applicationContext.xml to configure the DI
ОтветитьThank a lot Erik, this just made setter injection easier
ОтветитьHey Erik, thanks for this post! Great example for the @Autowired and @Qualifier!
ОтветитьGreat video man! thanks for taking the time to show us.
Cheers from Guadalajara
You know IntelliJ has auto save right? Also day mode eww
ОтветитьAwesome!
Ответитьwrite methods with first letter Caps wtf?
ОтветитьThank you for the video. Can you please create a video on how to pull data from sql and display on the UI?
ОтветитьThank you
Ответитьthanks a lot! :)
ОтветитьThanks! Well explained.
ОтветитьIt's better to use constructor injection for testability. Your methodnames also need to start with a small letter
ОтветитьThanks, Erik, nice lesson! Keep them coming. :)
Ответить