-
Notifications
You must be signed in to change notification settings - Fork 0
/
hibernate.cfg.xml
25 lines (24 loc) · 1.37 KB
/
hibernate.cfg.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<!-- Define your JDBC connection information-->
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/parser</property>
<property name="hibernate.connection.username">root</property>
<property name="hibernate.connection.password">total</property>
<!-- specifies the particular SQL variant with which Hibernate will converse. Ie: MySQL-->
<property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="show_sql">true</property>
<property name="format_sql">false</property>
<!-- Enable automatic generation of database schemas directly into the database -->
<!-- Drop and re-create the database schema on startup otherwise use update-->
<property name="hbm2ddl.auto">create</property>
<!-- Finally, add the mapping file(s) for persistent classes to the configuration.
Hence enabling Hibernate's automatic session context management-->
<mapping class="com.ef.data.IpAddress" />
<mapping class="com.ef.data.StatusComment" />
</session-factory>
</hibernate-configuration>