Add the automatic prompt function to the hibernate configuration file (*. HBM. XML) of Eclipse.

Source: Internet
Author: User

Add the automatic prompt function to the hibernate configuration file (*. HBM. XML) of Eclipse.

When editing the *. HBM. xml file, myeclipse provides the automatic prompt function, but eclipse does not have the automatic prompt function. Manually add:
1. Open any *. HBM. xml file in the project and check the file header, as shown below:

<?xml version="1.0" encoding="utf-8"?>  <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN""http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">  

Find
Http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd (depending on the hibernate version, the author uses hibernate3.6.7 ).
2. Decompress hibernate3.jar used in the project and find the hibernate-mapping-3.0.dtd file under hibernate file under org file after decompression.
3. eclipse-> window-> preferences-> Web and XML-> XML catalog, select Add of XML catalog entries... button, in the pop-up add XML catalog entry dialog box, select the hibernate-mapping-3.0.dtd in step 2 in location, select URI for key type, enter http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtdin step 1. OK.
Open the *. HBM. xml file in eclipse, and you can have the automatic prompt function as in myeclipse.

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.