开发者社区> 问答> 正文

hibernate的自动建表功能配置完了也不成功

screenshot
screenshot
screenshot
screenshot
然后,测试结果红条报错,但是找不到哪里错了,是测试类没写对吗?还是怎么着,模型、映射、和自动建表的配置应该就是这么写的?
screenshot

展开
收起
蛮大人123 2016-06-06 17:21:42 2416 0
1 条回答
写回答
取消 提交回答
  • 我说我不帅他们就打我,还说我虚伪
    <?xml version="1.0" encoding="UTF-8"?>
    
    <!DOCTYPE hibernate-configuration PUBLIC
    "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
    "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
    <hibernate-configuration>
    <session-factory>
      <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
      <property name="hibernate.connection.password">root</property>
      <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/hibernate</property>
      <property name="hibernate.connection.username">root</property>
      <property name="hibernate.dialect">org.hibernate.dialect.MySQDialect</property>
      <property name="hibernate.show_sql">true</property>
      <property name="hibernate.hbm2ddl.auto">update</property>
      <mapping resource="org/crazyit/app/domain/News.hbm.xml"/>       
    </session-factory>
    </hibernate-configuration>
    2019-07-17 19:29:03
    赞同 展开评论 打赏
问答分类:
问答标签:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载