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!

原文链接:Spring Boot Dependency Injection with Autowiring… wut?

© 版权声明
THE END
喜欢就支持一下吧
点赞14 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容