mysql的hibernate配置

 

  <hibernate-configuration> 

<session-factory> 
  <property name="connection.username">账号</property> 
  <property name="connection.password">密码</property> 
  <property name="connection.url"> 
  jdbc:mysql://localhost:3306/数据库名称 
  </property> 
  <property name="dialect"> 
  org.hibernate.dialect.MySQLDialect 
  </property>   <property name="connection.driver_class"> 
  com.mysql.jdbc.Driver 
  </property> 

</session-factory> 

</hibernate-configuration> 

 

看看你mysql的驱动jar在项目的lib下面没有

你可能感兴趣的:(Hibernate)