org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not a

来源:互联网 发布:pe管道绘图软件 编辑:程序博客网 时间:2024/05/17 09:17

org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 59 in XML document from class path resource [beans.xml] is invalid; nested exception is org.xml.sax.SAXParseException: The prefix "tx" for element "tx:annotation-driven" is not bound.

前缀“tx”元素“tx:annotation-driven“没有约束。

解决:
在<beans 中加入       xmlns:tx="http://www.springframework.org/schema/tx">