当前位置: 代码迷 >> Eclipse >> hibernate+spring报错!求答案!该如何解决
  详细解决方案

hibernate+spring报错!求答案!该如何解决

热度:21   发布时间:2016-04-23 14:46:30.0
hibernate+spring报错!急求答案!

我的配置文件是这样的,老是报这样的错,请问如何解决?谢谢谢谢啦!!
<?xml   version= "1.0 "   encoding= "UTF-8 "?>
<!DOCTYPE   beans   PUBLIC   "-//SPRING//DTD   BEAN//EN "   "http://www.springframework.org/dtd/spring-beans.dtd ">

<beans>


<bean   id= "sessionFactory "
class= "org.springframework.orm.hibernate3.LocalSessionFactoryBean ">

<property   name= "configLocation ">
<value> classpath:hibernate.cfg.xml </value>
</property>

<property   name= "dataSource ">
<ref   local= "dataSource "/>
</property>

<property   name= "hibernateProperties ">
<props>
<prop   key= "hibernate.dialect "> org.hibernate.dialect.MySQLDialect </prop>
<prop   key= "hibernate.show_sql "> true </prop>
</props>
</property>

<property   name= "mappingResources ">
<list>
<value> User.hbm.xml </value>
</list>
</property>
</bean>
<bean   id= "dataSource "
class= "org.springframework.jdbc.datasource.DriverManagerDataSource ">
<property   name= "driverClassName ">
<value> com.mysql.jdbc.Driver </value>
</property>
<property   name= "url ">
<value> jdbc:mysql://localhost:3306/mydb </value>
</property>
<property   name= "username ">
<value> root </value>
</property>
<property   name= "password ">
<value> root </value>
</property>
</bean>
<bean   id= "hibernateTemplate "
class= "org.springframework.orm.hibernate3.HibernateTemplate "
abstract= "false "   singleton= "true "   lazy-init= "default "
autowire= "default "   dependency-check= "default ">
<property   name= "sessionFactory ">
<ref   bean= "sessionFactory "   />
</property>
</bean>
<bean   id= "userDao "   class= "com.zhg.UserDAOHibernate "   abstract= "false "
singleton= "true "   lazy-init= "default "   autowire= "default "
dependency-check= "default ">
<property   name= "hibernateTemplate ">
<ref   bean= "hibernateTemplate "   />
</property>
</bean> </beans>

------解决方案--------------------
sf
------解决方案--------------------

------解决方案--------------------
错误呢?
------解决方案--------------------
关注
------解决方案--------------------
报哪样的错呀,BS楼猪,提问都不会!
  相关解决方案