hibernate.cfg配置mysql方言

hibernate自动建表,mysql高版本不支持 type=InnoDB 中的type关键字。
应该使用engine关键字 而非type 所以需要在hibernate.cfg.xml中配置方言。否则在create table语句中会抛sql语法错误异常。
<property name="hibernate.dialect">org.hibernate.dialect.MySQL5InnoDBDialect</property>
Hibernate: 
    
    create table orders (
       orderid integer not null auto_increment,
        remark integer,
        userid integer,
        primary key (orderid)
    ) engine=InnoDB
 
原文地址:https://www.cnblogs.com/tdws/p/4257309.html