hibernate相关的XML文件自动提示设置

版权声明:本文为博主原创文章,转载请注明出处。 https://blog.csdn.net/ItChuangyi/article/details/81043617

主要是在eclipse中进行相关的设置:

打开eclipse【windows】–>【preference】–>【XML】–>【XMLCatalog】页面
这里写图片描述

一、配置hibernate-cfg.xml文件的自动提示

这里写图片描述

1、Location填hibernate-configuration-3.0.dtd文件的本地地址:

**首先需要下载相关的文件**

D:\Develop\XML-auto\hibernate\hibernate-configuration-3.0.dtd

2、Key type 填public ID时,key为 :

-//Hibernate/HibernateConfiguration DTD 3.0//EN

3、Key type 填URI时,key填:

http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd
二、配置hibernate-mapping映射文件的自动提示:

配置方式与上面一致

1、Location填hibernate-mapping-3.0.dtd文件的本地地址:

D:\Develop\XML-auto\hibernate\hibernate-mapping-3.0.dtd

2、Key type 填public ID时,key为 :

-//Hibernate/HibernateMapping DTD 3.0//EN

3、Key type 填URI时,key填:

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

像spring、dubbo等的自动提示设置与此方法一样。

猜你喜欢

转载自blog.csdn.net/ItChuangyi/article/details/81043617
今日推荐