Monday, December 21, 2009

Basic Hibernate Command line application

Here is a basic hibernate command line application that is based on the getting started chapter of Hibernate Reference Documentation. It works with PostgreSQL and can be used to play around with small code changes and seeing the impact on the database. To point to another database, change hibernate.cfg.xml.


To build the application, run

mvn clean install

To execute, run

mvn exec:java -Dexec.mainClass=tutorial.EventManager -Dexec.args="store"

No comments: