问答详情
源自:1-11 通过Hibernate API编写访问数据库的代码

大神帮我看看,到底怎么了?

三月 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


提问者:心跳7 2017-03-13 18:01

个回答

  • wshyzx
    2017-03-26 13:54:21

    hibernate.cfg.xml文件中缺了这句话

    <property name="hbm2ddl.auto">create</property>

    create换成update也行

    为什么这样呢?我们用MyEclipse的人总不会完全按照视频来操作,在网上的帖子、论坛中,生成hibernate.cfg.xml配置文件的步骤与本教程1-7中不同,是自动生成的,也就导致没有1-7中关键的那句话。

    所以要自己添加上。


  • wshyzx
    2017-03-25 18:50:42

    我遇到一样的问题。你解决了吗?

  • 黑细胞hei
    2017-03-14 13:55:37

    INFO: HHH000206: hibernate.properties not found