Advertisement
Guest User

Untitled

a guest
Feb 16th, 2017
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. Configuration configuration = new Configuration();
  2.  
  3. Properties properties = new Properties();
  4. properties.put("hibernate.connection.username","***");
  5. properties.put("hibernate.connection.password","***");
  6. properties.put("hibernate.connection.driver_class","com.mysql.jdbc.Driver");
  7. properties.put("hibernate.connection.url","jdbc:mysql://localhost:3306/infinitefinancesschema");
  8.  
  9. configuration.addAnnotatedClass(ApplTest.class);
  10. configuration.setProperties(properties);
  11.  
  12. SessionFactory sessionFactory = configuration.buildSessionFactory();
  13. sessionFactory.??? // need to build session factory!
  14.  
  15. <dependency>
  16. <groupId>org.hibernate</groupId>
  17. <artifactId>hibernate-entitymanager</artifactId>
  18. <version>5.1.3.Final</version>
  19. </dependency>
  20. <dependency>
  21. <groupId>org.hibernate</groupId>
  22. <artifactId>hibernate-search-infinispan</artifactId>
  23. <version>5.6.0.Final</version>
  24. </dependency>
  25. <dependency>
  26. <groupId>org.hibernate</groupId>
  27. <artifactId>hibernate-search-orm</artifactId>
  28. <version>5.6.0.Final</version>
  29. </dependency>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement