-
Notifications
You must be signed in to change notification settings - Fork 440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
关于对象注入的问题 #5
Comments
个人理解,对写测试比较友好 |
好的 谢谢 |
工程实践推荐使用的就是构造方法注入哦!具体原因我忘了。 |
好的 学习啦 🤝 |
构造器注入解决不了循环依赖的问题吧。 |
那就可以考虑用setter吧,毕竟直接@Autowired会有warning,虽然我们公司都是@Autowired一把梭 |
事实上idea(我是19.1)可以对autowired自动转换位构造器,直接alt + enter就完事了 |
我看了代码 都是使用的构造方式注入,为什么不用@resource或者@Autowired 注解式注入呢? 是有什么说法吗?
The text was updated successfully, but these errors were encountered: