org.hibernate.MappingException: Resource: Person.hbm.xml not found解决方法:
代码:
hibernate.cfg.xml:
 <?xml version= "1.0 " encoding= "UTF-8 "?>
<!DOCTYPE hibernate-configuration
PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN "
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd ">
<hibernate-configuration>
<session-factory >
<!-- local connection properties -->
<property name= "hibernate.connection.url "> jdbc:mysql://133.124.42.55:3306/webshow?characterEncoding=gb2312&useUnicode=true </property>
<property name= "hibernate.connection.driver_class "> org.gjt.mm.mysql.Driver </property>
<property name= "hibernate.connection.username "> root </property>
<property name= "hibernate.connection.password "> </property>
<!-- property name= "hibernate.connection.pool_size "> </property -->
<!-- dialect for MySQL -->
<property name= "dialect "> org.hibernate.dialect.MySQLDialect </property>
<property name= "hibernate.show_sql "> false </property>
<property name= "hibernate.transaction.factory_class "> org.hibernate.transaction.JDBCTransactionFactory </property>
<mapping resource= "Person.hbm.xml "/>
</session-factory>
</hibernate-configuration>
------解决方法--------------------------------------------------------
<mapping resource= "Person.hbm.xml "/>
这里出了问题,你这里应该加上包名person