<?XML version= "1.0" encoding= "UTF-8"?><!DOCTYPE hibernate-configuration Public "-//hibernate/hibernate configuration DTD 3.0//en" "http// Hibernate.sourceforge.net/hibernate-configuration-3.0.dtd "> <hibernate-configuration> <session-factory> <!--Database-driven - < Propertyname= "Connection.driver_class">Com.mysql.jdbc.Driver</ Property> <!--URL of the database connection - < Propertyname= "Connection.url">Jdbc:mysql://localhost:3306/db_database10?characterencoding=utf8</ Property> <!--database connection user name - < Propertyname= "Connection.username">Root</ Property> <!--Database connection Password - < Propertyname= "Connection.password">111</ Property> <!--Hibernate dialect - < Propertyname= "dialect">Org.hibernate.dialect.MySQLDialect</ Property> <!--Print SQL statements - < Propertyname= "Show_sql">True</ Property> <!-- mapping files --<mapping resource= "com/mr/ Employee/employee.hbm.xml "/><mapping resource=" Com/mr /product/product.hbm.xml "/></session-factory> </hibernate-configuration>
Jdbc:mysql://localhost:3306/db_database10?characterencoding=utf8
A hitbernate configuration file with several tables (note mapping)