zoukankan      html  css  js  c++  java
  • SSH中的Dao类继承HibernateDaoSupport后出现异常

    异常:'sessionFactory' or 'hibernateTemplate' is required

    原因:未注入hibernateTemplate,需要在spring的配置文件中明确指定bean以byName的方式匹配

    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:tx="http://www.springframework.org/schema/tx"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
    http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
    http://www.springframework.org/schema/context
    http://www.springframework.org/schema/context/spring-context-4.0.xsd
    http://www.springframework.org/schema/tx
    http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
    "
    default-autowire="byName" >

  • 相关阅读:
    Ensp模拟OSPF与ACL综合应用
    ENSP配置NAT
    Ensp配置RSTP
    EnspOSPF单区域配置
    Ensp配置静态路由和默认路由
    NotPron国外版
    MSF
    转换流
    梦之光芒1-14关通关秘籍
    php序列化与反序列化
  • 原文地址:https://www.cnblogs.com/lmq-1048498039/p/6949581.html
Copyright © 2011-2022 走看看