性感的大表哥 2016-05-13 17:25 采纳率: 0%
浏览 2949

spring 注入 dao,引用的时候为null

图片说明

spring配置文件如下:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">

default-autowire="no">

<bean id="IBdxmService" parent="baseTransactionProxy">
    <property name="target">
        <bean
            class="cn.com.ebidding.web.dljk.bdxm.service.impl.BdxmService">
            <property name="dao" ref="IBdxmDao" />
        </bean>
    </property>
</bean>

<bean id="IBdxmAuth" parent="baseTransactionProxy">
    <property name="target">
        <bean
            class="cn.com.ebidding.web.dljk.bdxm.auth.impl.BdxmAuth" singleton="false">
            <property name="dao" ref="IBdxmDao" />
        </bean>
    </property>
</bean>

<bean id="IBdxmBusiness" parent="baseTransactionProxy">
    <property name="target">
        <bean
            class="cn.com.ebidding.web.dljk.bdxm.business.impl.BdxmBusiness">
            <property name="dao" ref="IBdxmDao" />
        </bean>
    </property>
</bean>

<bean id="IBdxmValidate" parent="baseTransactionProxy">
    <property name="target">
        <bean
            class="cn.com.ebidding.web.dljk.bdxm.validate.impl.BdxmValidate">
            <property name="dao" ref="IBdxmDao" />
        </bean>
    </property>
</bean>

<bean id="IBdxmDao"
    class="cn.com.ebidding.web.dljk.bdxm.dao.impl.BdxmDao">
    <property name="sessionFactory" ref="sessionFactory" />
</bean> 

  • 写回答

3条回答 默认 最新

  • devmiao 2016-05-13 21:10
    关注
    评论

报告相同问题?

悬赏问题

  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突
  • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大
  • ¥15 import arcpy出现importing _arcgisscripting 找不到相关程序
  • ¥15 onvif+openssl,vs2022编译openssl64