Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?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="connection.driver_class">com.mysql.cj.jdbc.Driver</property>
- <property name="connection.url">jdbc:mysql://localhost/dbFatura?useTimezone=true&serverTimezone=UTC</property>
- <property name="connection.username">root</property>
- <property name="connection.password">root</property>
- <property name="dialect">org.hibernate.dialect.MySQLDialect</property>
- <property name="connection.pool_size">1</property>
- <property name="current_session_context_class">thread</property>
- <property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
- <property name="show_sql">true</property>
- <property name="hbm2ddl.auto">update</property>
- <!-- <mapping resource="org/hibernate/tutorial/domain/Fatura.hbm.xml"/> -->
- <mapping class="org.hibernate.tutorial.domain.Fatura"/>
- </session-factory>
- </hibernate-configuration>
- private static SessionFactory buildSessionFactory() {
- try{
- return new Configuration().configure("hibernate.cfg.xml").buildSessionFactory();
- } catch (Throwable ex) {
- System.err.println("Initial SessionFactory creation factory failed. " + ex);
- throw new ExceptionInInitializerError(ex);
- }
- }
- <property name="connection.url">jdbc:mysql://localhost/dbFatura?useTimezone=true&serverTimezone=UTC</property>
Add Comment
Please, Sign In to add comment