In the hibernate example, when I add a configuration file, Hibernate.cfg.xml does not have a hint. This is because I did not have a problem setting the DTD file, not the same version. It's good to re-import the DTD file. In the same situation, automatic prompting can be implemented by importing a DTD file.
Like what:
For a chestnut: Hibernate.cfg.xml's configuration file displays automatic prompts
1, reverse eclipse, find XML Catalog, "window", "preference", "XML"
2. Select User specified entried and choose "Add" on the left. "button, fill out the three actions, click OK.
(1) Location: Select the local hibernate-mapping-3.0.dtd path. This file in the hibernate file requires us to download the pressurized good.
For example, I am using the hibernate-release-4.1.1.final version, the path is: D:\Hibernate\hibernate-release-4.1.1.Final\project\hibernate-core\ Src\main\resources\org\hibernate.
(2) Key Type:uri. Be sure to select the URI in the type.
(3) Key:http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd. It can be found in the DTD file, and key will stick the DTD file in the Hibernate configuration file. Or you can just stick to it.
3. Close the configuration file and re-open it. If not, check how the XML file is opened. It is best to choose XML Editor.
Effect Diagram: