spring bean自动装配autowire属性

<!--    
通过名称自动注入
<bean id="videoOrder" class="com.example.demo01.domain.VideoOrder" autowire="byName">
-->
<!-- 
通过类型自动注入
<bean id="videoOrder" class="com.example.demo01.domain.VideoOrder" autowire="byType">
-->

<!-- 
通过构造器自动注入
<bean id="videoOrder" class="com.example.demo01.domain.VideoOrder" autowire="constructor">
-->
posted @ 2021-11-25 21:21  智慧搬运工  阅读(36)  评论(0)    收藏  举报