摘要:
spring提供了@Autowired Annotation来指定自动装配,使用@Autowired可以标注setter方法、普通方法、Field、函数形参和构造器等。例如下代码: 1 package cn.zj.qiao.spring.beans; 2 3 import org.springframework.beans.factory.annotation.Autowired; 4 import org.springframework.stereotype.Component; 5 6 import cn.zj.qiao.spring.interfaces.Axe; 7 import .. 阅读全文