初学hibernate,遇到一些问题
在用hibernate4和Mysql生成表的时候出现了
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'type=InnoDB' at line 7
的错误。
在网上阅读和查找之后,发现 type=InnDB 是mysql5.0以前用的,
只需要把数据库方言改为 hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect 变可以自动建表了。