The content of element type "property" must match "(meta*,(column|formula)*,type?)".出错

简单!!!

把hibernate.cfg.xml里的控制文件开头从

<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"

"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd" >


改为

<!DOCTYPE hibernate-configuration PUBLIC
          "-//Hibernate/Hibernate Configuration DTD 3.0//EN"

          "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">

就可以完美解决了,原因是你把配置的文件里的configuration,写成Mapping



猜你喜欢

转载自blog.csdn.net/qq_37101453/article/details/80271069