Add Hibernate configuration file for database setup
This commit is contained in:
22
hibernate-project/target/classes/hibernate.cfg.xml
Normal file
22
hibernate-project/target/classes/hibernate.cfg.xml
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
<?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>
|
||||||
|
<property name="jakarta.persistence.jdbc.driver">com.mysql.cj.jdbc.Driver</property>
|
||||||
|
<property name="jakarta.persistence.jdbc.url">jdbc:mysql://mysql:3306/testdb?useSSL=false&allowPublicKeyRetrieval=true</property>
|
||||||
|
<property name="jakarta.persistence.jdbc.user">root</property>
|
||||||
|
<property name="jakarta.persistence.jdbc.password">root</property>
|
||||||
|
|
||||||
|
<property name="hibernate.hbm2ddl.auto">update</property>
|
||||||
|
|
||||||
|
|
||||||
|
<property name="hibernate.show_sql">false</property>
|
||||||
|
<property name="hibernate.format_sql">true</property>
|
||||||
|
<mapping class="com.humanbooster.model.User"/>
|
||||||
|
<mapping class="com.humanbooster.model.Article"/>
|
||||||
|
<mapping class="com.humanbooster.model.Ad"/>
|
||||||
|
</session-factory>
|
||||||
|
</hibernate-configuration>
|
||||||
Reference in New Issue
Block a user