Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- Параметры коннекта -->
- <property name="connection.driver_class">org.postgresql.Driver</property>
- <!--
- <property name="connection.url">jdbc:postgresql://192.168.1.63/test</property>
- <property name="connection.username">postgres</property>
- <property name="connection.password">postgres</property>
- -->
- <property name="connection.verifyServerCertificate">false</property>
- <property name="connection.requireSSL">false</property>
- <property name="connection.useSSL">false</property>
- <property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>
- <property name="hibernate.c3p0.min_size">5</property>... + маппинги
- private static SessionFactory sessionFactory = null;
- static {
- Configuration cfg = new Configuration().configure()
- .setProperty("connection.url", "jdbc:postgresql://192.168.1.63/test")
- .setProperty("connection.username", "postgres")
- .setProperty("connection.password", "postgres");
- sessionFactory = cfg.buildSessionFactory();
- }
- public static SessionFactory getSessionFactory() {
- return sessionFactory;
- }
- Configuration cfg = new Configuration().configure()
- .setProperty("hibernate.connection.url", "jdbc:postgresql://192.168.1.63/test")
- .setProperty("hibernate.connection.username", "postgres")
- .setProperty("hibernate.connection.password", "postgres");
Add Comment
Please, Sign In to add comment