Spring Data REST generator – explanations

This week many of you asked: “Why does the Spring Data REST generator appear and why is it evolving so fast ?” A generator based on Spring Data was under investigation but with the help of Jon Brisbin, a major contributor of the Rest project, it was clear that there was no reason to wait. Spring Data REST, a part of the umbrella Spring Data, is becoming a key framework to achieve CRUD operations using REST :
“The goal of the Spring Data REST project is to provide a solid foundation on which to expose CRUD operations to your JPA Repository-managed entities using plain HTTP REST semantics.” From your JPA entites and the classes of Data REST, you can get in minutes an exporter providing the CRUD services. Easy and powerful. We thought we could bring something to help developers to jump in. In GenMyModel, the new generator gives the essential stuff from your domain model :

* JPA entites

* A CrudRepository per entity

* ApplicationConfig.java setting the basics: database access, transaction management…

* A Validator per entity

* All the configuration files: web.xml (defining the RepositoryRestExporterServlet servlet), pom.xml, persistence.xml, logback.xml,repository-export.xml


Spring Data REST generator artefacts overview

Spring Data REST - CRUD repository

Once your application is generated, the rest-shell coded by Jon, “a command-line shell for interacting with Spring HATEOAS-compliant REST resources” is an excellent solution to quicly test your services.

We’ll make the generator evolve with your feedback. Spring Data REST went 1.0.0.RELEASE this week, it’s promising.


Tweet about this on TwitterShare on FacebookShare on Google+Share on LinkedIn

About the author

Tom Team

GenMyModel co-founder - @tomlegrd