hibernate不能自动建表的解决方案

<?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">liaobin1992</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.MySQLInnoDBDialect</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>

更改配置:

<property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
将这行换成:

<property name="hibernate.dialect">org.hibernate.dialect.MySQDialect</property>


你可能感兴趣的:(hibernate不能自动建表)