Provide an integrated starter project for SpringMVC + Spring ORM, backed by Hibernate and PostgreSQL.
This project demonstrates a variety of useful functions right out of the box, and can be used as a starting point for a real web application. It makes extensive use of SpringMVC for the web tier. It also uses Spring to replace the direct access to the JPA entity manager API and instead uses Spring dependency injection patterns to access data.
- JPA annotations
- Log4J via SLF4J
- Hibernate maven plugin
- Spring MVC
- Spring ORM
- JSTL page rendering
- Implementation of REST API, automatically returning JSON serialization.
- Parsing and controller routing in Spring MVC
- File upload
- Database access via injected DAO objects
Setup and run
Assuming you have setup your postgres database separately and have updated persistence.xml to point at it...
- mvn clean install -DskipTests
- mvn hibernate3:hbm2ddl
- Use target/hibernate3/sql/schema.ddl to create your database schema
- mvn -e exec:java -Dexec.mainClass=com.force.samples.util.DataLoadUtil (adds some data to the database)
- mvn tomcat:run
- Point browser at http://localhost:8080/webapp-springmvc-jpa-hibernate