Hibernate.cfg.xml configuration file in Eclipse Plus auto prompt feature

Source: Internet
Author: User


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:





Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.