An example application combining Spring 3, Spring Data JPA, Swagger and Jersey to implement a RESTful web service with minimal amount of manual code
Three service examples are provided:
-
Category: Minimal code implementation of a basic CRUD service See: CategoryService.java Category.java
-
Event: Spring Data based example with two finders and full Swagger documentation See: EventService.java Event.java
-
Support: Manually implemented partially restful JAX-RS service example Uses a Spring Data generated Repository for database access. See: SupportService.java SupportCaseRepository.java SupportCase.java
-
Install project Lombok into your favourite IDE http://projectlombok.org/download.html
-
Import as Maven project
-
Run as Web app
For Save->Refresh workflow, run the application from command line with
$ MAVEN_OPTS="-XX:MaxPermSize=2048m" mvn jetty:run
http://static.springsource.org/spring-data/data-jpa/docs/1.3.2.RELEASE/reference/html/
https://github.com/SpringSource/spring-data-jpa-examples
http://blog.springsource.org/2011/04/26/advanced-spring-data-jpa-specifications-and-querydsl/
https://github.com/wordnik/swagger-core/wiki
https://github.com/wordnik/swagger-core/wiki/java-jax-rs