Create a configuration file for Hibernate and a special DTD symbol in the format of a Java property file.

Source: Internet
Author: User

Create a configuration file for Hibernate and a special DTD symbol in the format of a Java property file.

 

Sample Code

hibernate.dialect=org.hibernate.dialect.MySQLDialecthibernate.connection.driver_class=com.mysql.jdbc.Driverhibernate.connection.url=jdbc:mysql://localhost:3306/SAMPLEDBhibernate.connection.username=roothibernate.connection.password=1234hibernate.connection.show_sql=true

Attribute

Hibernate. dialect specifies the SQL dialect used by the database

Hibernate. connection. driver_class specifies the driver of the database.

Hibernate. connection. url specifies the URL of the connection data

Hibernate. connection. username specifies the username used to connect to the database.

Hibernate. connection. password specifies the password to connect to the database

If hibernate. connection. show_ SQL is set to true, the SQL statement is output on the console when the program is running. This is helpful for tracking the running status of Hibernate. The default value is false. In the application development and testing phase, you can set this attribute to true to track and debug the application. In the application release phase, set this attribute to false, reduces application output information and improves running performance.


Special DTD symbols

The sub-element must exist only once in the parent element.

+ The child element must exist in the parent element. It can exist once or multiple times.

* This child element may not exist in the parent element, or may exist once or multiple times. It is a commonly used symbol.

? The child element does not exist in the parent element, or only exists once. It is a common symbol.



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.