求下列代码详解,谢谢各位大神了,跪求

<bean id="chezhuxinxiDao" class="com.sysgrrj.module.Chezhuxinxi.dao.ChezhuxinxiDao">
        <property name="sessionFactory">
            <ref bean="sessionFactory"/>
        </property>
    </bean>

    <bean name="chezhuxinxiBean" class="com.sysgrrj.module.Chezhuxinxi.action.ChezhuxinxiAction" scope="prototype">
        <property name="dao">
            <ref bean="chezhuxinxiDao"/>
        </property>
        <property name="coreService">
            <ref bean="coreService"/>
        </property>
    </bean> 

定义了两个bean,以及它们依赖的service和factory





<bean name="chezhuxinxiBean" class="com.sysgrrj.module.Chezhuxinxi.action.ChezhuxinxiAction" scope="prototype"> 定义的bean对应你的方法类ChezhuxinxiAction
    <property name="dao">
        <ref bean="chezhuxinxiDao"/>在ChezhuxinxiAction中使用的dao注入
    </property>
    <property name="coreService">
        <ref bean="coreService"/>
    </property>
</bean> 

应该dao、service、action各一个bean配置

spring 的依赖注入