- Postgresql Database(9.3) – http://www.postgresql.org/download/
- Hibernate Jars (4.3.4)- http://hibernate.org/orm/downloads/
- Postgres JDBC Driver – http://jdbc.postgresql.org/
Steps to create:
- Create a testProject in your eclipse and include the hibernate Jars and Postgres JDBC driver in your class path.
- Create a hibernate.cfg.xml file and it should look like this.
- Create a DTO POJO with getters and setters method. Add @Entity Annotation to the top of that class.
- Create a test class with main() function. The main() function will look something like:
- Run the application as a Java application and see the results in postgresDB.
Changes can be updated from this location: https://github.com/volcanicprateek/hibernateTest.git