Monthly Archives: April 2014

First hibernate application

Tools used:

  1. Postgresql Database(9.3) –
  2. Hibernate Jars (4.3.4)-
  3. Postgres JDBC Driver –

Steps to create:

  1. Create a testProject in your eclipse and include the hibernate Jars and Postgres JDBC driver in your class path.
  2. Create a hibernate.cfg.xml file and it should look like this.
  3. Create a DTO POJO with getters and setters method. Add @Entity Annotation to the top of that class.
  4. Create a test class with main() function. The main() function will look something like:
  5. Run the application as a Java application and see the results in postgresDB.

Changes can be updated from this location: