一,配置hibernate数据库
我采用的是mysql数据库,下面为我的hibernate配置
<property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property> <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property> <property name="hibernate.connection.url">jdbc:mysql://127.0.0.1:3306/leavedb</property> <property name="hibernate.connection.username">root</property> <property name="hibernate.connection.password">123456</property> <property name="hibernate.hbm2ddl.auto">create-drop</property> <property name="hibernate.format_sql">true</property>
定义了一个最简单的流程