This is the hibernate configuration file used for providing database connection for the application. It also provide mapping tag which our model class to database table.
<?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> <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property> <property name="hibernate.connection.url">jdbc:mysql://192.168.10.13:3306/onlinexamination</property> <property name="hibernate.connection.username">root</property> <property name="connection.password">root</property> <property name="connection.pool_size">1</property> <property name="hibernate.dialect">org.hibernate.dialect.MySQL5Dialect</property> <property name="show_sql">true</property> <property name="current_session_context_class">thread</property> <property name="hbm2ddl.auto">update</property> <mapping class="net.roseindia.Model.AddInformation"/> </session-factory> </hibernate-configuration>
Advertisements
Ads
Ads