今天用myeclipse生成了几个新的实体后,出现这个警告,就百度了下,可是答案有太多,看了几个根本不行,然后用百度翻译了下,意思是标签头的dtd文件的前头过时了,替换后,警告就消失了。
生成的实体xml开头:
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
出现的警告信息:
WARN DTDEntityResolver:73 - recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!
将 http://hibernate.sourceforge.net/ 替换成 http://www.hibernate.org/dtd/
完成如下:
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
警告消息消失。