Spring Boot Dependency Injection with Autowiring... wut?

I've been trying to catch up on Java now, doing advanced courses on Coursera featuring graph-theory, data structures and algorithms and all that stuff. Then I went on to do some hands on, practical "How To" type tutorials, and as long as one follows the instructor, all goes well.

The problem arises though, when I try to add some features or new data to the application. All through the tutorials the instructor adds all these @Autowired properties all around, but I can't seem do grok how they are actually populated. I am not even sure where in the app the values for these are initialized or marked or whatever to be used as the value to be magically inserted by the framework.

I do understand that the Spring Boot framework does the magic under the hood using dependency injection, but now how to utilize that magic on purpose and control it.

Thanks!

Did you find this post useful? Show some love!
DISCUSSION (2)

Hey, I understand the feeling. Spring boot magic can feel a bit overwhelming at first. I thought this might help: docs.spring.io/spring-boot/docs/cu...

Wow, thanks for the tip! That does help and gives me more terms to search for!

Classic DEV Post from Oct 8

Start-up v Corporate, which do you prefer?

Becoming a Corporate is bad, staying a Start-up forever is good. Or is it?

READ POST
Follow @helenanders26 to see more of their posts in your feed.
Morten Olsrud
Dev doing sysops and technical project leading, advising and what ever pops up. Working mostly in the web-space these days, but educated and certified (though expired) in Java.
Trending on dev.to
Any idea how to start blogging as a developer?
#discuss #idea #blog
How banks handle our balance, technically?
#explainlikeimfive #programming #databases #design
Designing A Voting System For 1 Billion on the Blockchain (Part 2) - How To Keep A Secret
#blockchain #opensource #architecture #discuss
Find someone to mentor
#productivity #career #devto
Learning the Granular Details of a Programming Language?
#discuss #javascript
How I backup/sync my dotfiles & apps
#git #bash #productivity #automation
How To Stay Motivated When Learning to Code?
#discuss #help #programming
Breaking up with my mouse (Mac edition)
#productivity #webdev