Session
Building simple CRUD services with Spring Data REST
Imagine you want to build a simple web service, providing an API for CRUD (Create, Read, Update, Delete) operations. You need to
* connect to databases
* create database-specific queries
* build query statements
* create controllers
* analyse results sets
You see, that's a lot of boilerplate. Using Spring Boot and Spring Data helps you reducing this boilerplate. You don't need to care on database connections and queries anymore and use Spring Data repositories instead of query statements. The auditing feature helps to keep consistency.
With [Spring Data REST](https://spring.io/projects/spring-data-rest) you can even do more. It uses a Domain-class centric approach to repository interactions. You only need to define what's really important - the domain classes. Domains created with Spring Data REST generate controllers and their dependencies. On top you get [HATEOAS](https://spring.io/understanding/HATEOAS) links you need to walk through your data.
### Key Learnings
* comparison of a handwritten REST service and a Spring Data REST service
* use ApplicationListeners, e.g. to do some more specific validations
* how to use HTTP verbs GET, PUT, POST, PATCH and DELETE
Please note that Sessionize is not responsible for the accuracy or validity of the data provided by speakers. If you suspect this profile to be fake or spam, please let us know.
Jump to top