@Autowred和@Resource

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接: https://blog.csdn.net/Jatham/article/details/96317610

@Resource和@Autowired

@Resource按照名称进行依赖注入

	@Resource(name="apple")

@Autowired按照类型进行属性注入

	@Autowired
	@Qualifier("pear")

猜你喜欢

转载自blog.csdn.net/Jatham/article/details/96317610