hibernate中 org.hibernate.MappingException: invalid configuration 报错

时间:2014-07-01 11:40:01   收藏:0   阅读:273

<session-factory>
   <!-- #1:基本四项 -->
  <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
  <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/h01</property>
  <property name="hibernate.connection.username">root</property>
  <property name="hibernate.connection.password">123</property>
  <!-- #2:方言 -->
  <property name="hibernate.dialect">org.hibernate.dialect.MySQL5Dialect</property>
 
  <!-- #3 显示sql语句,格式化sql语句 -->
  <property name="hibernate.show_sql">true</property>
  <property name="hibernate.format_sql">true</property>
  
  <!-- 注册映射文件 -->
  <mapping resource="cn/itcast/a_hello/User.hbm.xml"/>
 
  
  <!-- 取消bean验证, javaweb6.0时才有 -->
  <property name="javax.persistence.validation.mode">none</property>
  这两行换下位置即可
  
 </session-factory>

hibernate中 org.hibernate.MappingException: invalid configuration 报错,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!