心跳7
2017-03-13 18:01
三月 13, 2017 6:00:08 下午 org.hibernate.annotations.common.Version <clinit>
INFO: HCANN000001: Hibernate Commons Annotations {4.0.2.Final}
三月 13, 2017 6:00:08 下午 org.hibernate.Version logVersion
INFO: HHH000412: Hibernate Core {4.2.4.Final}
三月 13, 2017 6:00:08 下午 org.hibernate.cfg.Environment <clinit>
INFO: HHH000206: hibernate.properties not found
三月 13, 2017 6:00:08 下午 org.hibernate.cfg.Environment buildBytecodeProvider
INFO: HHH000021: Bytecode provider name : javassist
三月 13, 2017 6:00:08 下午 org.hibernate.cfg.Configuration configure
INFO: HHH000043: Configuring from resource: /hibernate.cfg.xml
三月 13, 2017 6:00:08 下午 org.hibernate.cfg.Configuration getConfigurationInputStream
INFO: HHH000040: Configuration resource: /hibernate.cfg.xml
三月 13, 2017 6:00:08 下午 org.hibernate.cfg.Configuration addResource
INFO: HHH000221: Reading mappings from resource: Student.hbm.xml
hibernate.cfg.xml文件中缺了这句话
<property name="hbm2ddl.auto">create</property>
create换成update也行
为什么这样呢?我们用MyEclipse的人总不会完全按照视频来操作,在网上的帖子、论坛中,生成hibernate.cfg.xml配置文件的步骤与本教程1-7中不同,是自动生成的,也就导致没有1-7中关键的那句话。
所以要自己添加上。
我遇到一样的问题。你解决了吗?
INFO: HHH000206: hibernate.properties not found
Hibernate初探之单表映射
74804 学习 · 826 问题
相似问题