byName 方式
<!--byName约束:bean当中的域属性名必须跟所注入bean的id相同-->
<bean id="student" class="cn.spring.entity.Student" autowire="byName">
<property name="stu_id" value="1"></property>
<property name="stu_name" value="张三"></property>
</bean> <bean id="teacher" class="cn.spring.entity.Teacher">
<property name="t_id" value="1"></property>
<property name="t_name" value="王洪涛"></property>
</bean>
bean当中的域属性名必须跟所注入bean的id相同
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAhYAAAB1CAYAAAASuKgOAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAABAMSURBVHhe7d2xaxxJ9sDxzR0ocjKHDhYLbAvGaNkdsRiUrPdwJDBOjPFkRuDDCOFwzwoc2OmdcXLBXuBgD/QPKNpEsf8BwcKiP8CX78EFdfWqu2dqel51V5d7VOrR9wcf1npT3V2jX12/N1U1ra+++tO3BgAAoBdqEAAAIIUaBAAASKEGAQAAUqhBAACAFGoQAAAghRoEAABIoQYBAABSqEEAAIAUahAAACCFGgQAAEihBgEAAFKoQQAAgBRqEAAAIIUaBAAASKEGAQAAUqhBAACAFGoQAAAghRoEAABIoQYBAABSqEEAAIAUahAAACCFGgQAAEihBgEAAFKoQQAAgBRqEAAAIIUaBAAASKEGAQAAUqhBAACAFGoQAAAghRoEAABIoQYBAABSqEEAAIAUahAAACCFGgQAAEihBhFv9NSM9p/qr/lsu9uvz8xo8o3Z2P/o/qu2800+mvu/XJgde1w3F+b+62P9nBXpz/szc7ul79LXtjYAAMyowXVnE/bOQYdk2dR+/8z8KMm/Lfm6IqEoLL4aHZudX4y539KHjYML8+P7j2ZjFFGEVFzB0H7uqmi53VTglOfq3AcAwPWlBteZJPXXHRJlS/vRa5t422YHLCkS/GTfWjTEFgh1VQHT8v7c9ZV+b0y868UUHwAA+NTgGhu9bk+6vsb25czDzn7L+VyRUEvQMgvSNMvhkrotLN5rSx0NZIYhahlE6Xd1zYPi+KQZEwDA9aYG19TGwVmnT9+t7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A0aiEAAACANGohAAAAgDRqIQAAAIA0aiEAAACANGohAAAAgDRqIQAAAIAE/2P+DzFehKMi1KyzAAAAAElFTkSuQmCC" alt="" />
byType 方式
<!--byType:要求被注入域属性类型只能唯一,与其向兼容的类型也同样不可以-->
<bean id="student2" class="cn.spring.entity.Student" autowire="byType">
<property name="stu_id" value="1"></property>
<property name="stu_name" value="张三"></property>
</bean> <bean id="teacher" class="cn.spring.entity.Teacher">
<property name="t_id" value="1"></property>
<property name="t_name" value="王洪涛"></property>
</bean>
这里的teacher类型在student中只能存在一个才能使用byType自动装配,如果出现同类型(同类型的子类),都无法实现自动装配