网上都是说在dao中未注入  sessionFactory,然而我有 于是排除

@Autowired
public FlightDaoImpl(@Qualifier(value = "sessionFactory")SessionFactory sessionFactory){
//注入 sessionFactory
this.setSessionFactory(sessionFactory);
}

一直报这个错后来发现是

default-autowire="byName" 这个自动装配属性没加

'sessionFactory' or 'hibernateTemplate' is required的更多相关文章

  1. Hibernate整合Spring异常'sessionFactory' or 'hibernateTemplate' is required

    今日在写GenericDao时,发现了一个异常,内容如下: org.springframework.beans.factory.BeanCreationException: Error creatin ...

  2. java.lang.IllegalArgumentException: 'sessionFactory' or 'hibernateTemplate' is required

    java.lang.IllegalArgumentException: 'sessionFactory' or 'hibernateTemplate' is required 严重: Exceptio ...

  3. 'sessionFactory' or 'hibernateTemplate' is required解决方法

    这种情况就是在通过spring配置hibernate4的时候(注意,这里是hibernate4不是hibernate3,hibernate3的),使用的是HibernateDaoSupport的这种方 ...

  4. SSH整合,"sessionFactory " or "hibernateTemplate " is required异常

    首先遇到的问题就是HibernateDaoSupport引起的,程序中所有的DAO都继承自HibernateDaoSupport,而HibernateDaoSupport需要注入sessionfact ...

  5. SSH框架环境搭建问题:java.lang.IllegalArgumentException: 'sessionFactory' or 'hibernateTemplate' is required

    SSH框架启动tomcate时出错 严重: Exception sending context initialized event to listener instance of class org. ...

  6. spring注解方式,异常 'sessionFactory' or 'hibernateTemplate' is required的解决方法

    做单元测试的时候,抛出异常 Caused by: java.lang.IllegalArgumentException: 'sessionFactory' or 'hibernateTemplate' ...

  7. "sessionFactory " or "hibernateTemplate " is required异常

    <beans    xmlns="http://www.springframework.org/schema/beans"    xmlns:xsi="http:/ ...

  8. SessionFactory、HibernateTemplate、HibernateDaoSupport之间的关系说明

    在接触HibernateTemplate之前,我们知道,在对数据库进行CRUD操作之前,需要开启session.transaction等等.在hibernate学习过程中,我们知道了,得到sessio ...

  9. spring+hibernate常见异常集合

    spring+hibernate出错小结: (1)java.lang.NoClassDefFoundError: org/hibernate/context/CurrentSessionContext ...

随机推荐

  1. angular1结合webpack构建工具

    目录结构 webpack.config.js const { resolve } = require('path') const webpack = require('webpack') const ...

  2. 移动Web布局

    移动Web开发之移动页面布局 前言 本文针对手机设备设计的页面,并非兼容全设备的响应式布局,常见的MobileWeb页面如H5页面.手机页面.WAP页.webview页面等等.在不同尺寸的手机设备上, ...

  3. 菜鸟学习Spring——SpringMVC注解版控制层重定向到控制层

    一.概述. SpringMVC中界面请求Contorller1,Contorller1需要重定向到Contorller2中显示其他页面或者做一些业务逻辑,Spring中提供了这个功能利用"r ...

  4. java面试题之----super和this

    super和this的异同: super(参数):调用基类中的某一个构造函数(应该为构造函数中的第一条语句) this(参数):调用本类中另一种形成的构造函数(应该为构造函数中的第一条语句) supe ...

  5. redis复制集(sentinel)

    https://www.jianshu.com/p/45ffd2a84143 内核配置 cat >> /etc/rc.local << EOF echo never > ...

  6. Hive的运算和函数大全

    hive 常用运算 测试各种内置函数的快捷方法: 创建一个 dual 表 create table dual(id string); load 一个文件(只有一行内容:内容为一个空格)到 dual 表 ...

  7. 在一个服务中实现 多个契约 和终结点 z

    一个服务作为一系列终结点被定义的.每个终结点都有一个地址,绑定和契约.契约就是暴露终结点能力的.地址就是这些应用或服务从网络的哪个地址可找到,契约是关于如何访问他们的. 在终结点和契约间有一对多的关系 ...

  8. XP环境安装request包报错:离线安装packages: certifi urllib3 idna chardet

    分别下载 request certifi urllib3 idna chardet 安装包 数据包下载地址:https://pypi.org/ 解压到python安装目录 使用cmd命令进入..\py ...

  9. SpringMvc-自定义视图

    1.创建视图: 注意:创建视图的时候需要实现View接口的俩个方法 package com.atguigu.springmvc.views; import java.util.Date; import ...

  10. 笨办法学Python(四十)

    习题 40: 字典, 可爱的字典 接下来我要教你另外一种让你伤脑筋的容器型数据结构,因为一旦你学会这种容器,你将拥有超酷的能力.这是最有用的容器:字典(dictionary). Python 将这种数 ...