用户登录
用户注册

分享至

创建hibernate.cfg.xml

  • 作者: 大二憨
  • 来源: 51数据库
  • 2020-12-24
比如用spring+hibernate
<bean id="sessionFactory" scope="singleton" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
<property name="configLocation" value="classpath:config/hibernate.cfg.xml">
</property>
</bean>
hibernate路径
src/config/hibernate.cfg.xml
实际项目中配置问价比较多,一般都新建个文件夹放配置文件



  你可以直接在文档上面找模版啊直接复制粘贴 就可以了



  你没有添加myeclipse中的hibernate开发框架。
你是手动添加的环境吧?
不行的话,就是用myeclipse自带的hibernate生成。
还不行就hi我吧~!
软件
前端设计
程序设计
Java相关