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
Property
Hibernate.dialect The SQL dialect used by the specified database
Hibernate.connection.driver_class The driver for the specified database
Hibernate.connection.url Specifying the URL of the connection data
hibernate.connection.username Specify the user name to connect to the database
Hibernate.connection.password specifying the password to connect to the database
Hibernate.connection.show_sql If True, indicates that when the program runs, the SQL statement is output in the console, which facilitates tracking hibernate's running state, which defaults to false. In the application development testing phase, this property can be set to true, in order to track and debug the application, in the application release phase, this property should be set to false, while reducing the output information of the application, improve the performance of the Operation
DTD Special symbolic function
Unsigned this child element must exist within the parent element and can only exist once
+ The child element must exist within the parent element and can exist one or more times
* The child element may not exist within the parent element, or it can exist one or more times, it is a more commonly used symbol
? The child element may not exist within the parent element, or it only exists once, and it is a more commonly used symbol
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Create hibernate configuration files in Java properties file format