当前位置: 代码迷 >> J2EE >> getHibernateTemplate替null
  详细解决方案

getHibernateTemplate替null

热度:66   发布时间:2016-04-22 00:39:00.0
getHibernateTemplate为null
问题如题:
<?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= "dataSource "
class= "org.apache.commons.dbcp.BasicDataSource ">
<property   name= "driverClassName ">
<value> oracle.jdbc.driver.OracleDriver </value>
</property>
<property   name= "url ">
<value> jdbc:oracle:thin:@192.168.1.100:1521:oracle </value>
</property>
<property   name= "username ">
<value> ZYMMS </value>
</property>
<property   name= "password ">
<value> 123 </value>
</property>
</bean>

<bean   id= "sessionFactory "
class= "org.springframework.orm.hibernate3.LocalSessionFactoryBean ">
<property   name= "dataSource ">
<ref   local= "dataSource "   />
</property>
<property   name= "hibernateProperties ">
<props>
<prop   key= "hibernate.dialect ">
org.hibernate.dialect.Oracle9Dialect
</prop>
<prop   key= "hibernate.show_sql "> true </prop>

</props>
</property>
<property   name= "mappingResources ">
<list>
<value> com/wzf/bean/Loginuser.hbm.xml </value>
</list>
</property>
</bean>
<bean   id= "loginUserDao "
class= "com.wzf.Hibernate.dao.LoginUserDao ">
<property   name= "sessionFactory ">
<ref   local= "sessionFactory "   />
</property>
</bean>
</beans>

------解决方案--------------------
请把具体应用放上来啊
你说的为null??什么意思?

中国JavaEE技术交流社区-欢迎您的参与探讨!

-- 打造“中国JavaEE技术交流社区“,欢迎j2ee爱好者朋友们的踊跃参与!
http://www.aspwind.cn
------解决方案--------------------
我也是同样问题,怎么解决的也不说!
------解决方案--------------------
也遇到同样的问题,伤脑筋,找来找去都不知道哪出错了~~
------解决方案--------------------
怎么解决的呀?怎么不写下来呀?
------解决方案--------------------
模板未注入
  相关解决方案