Using Spring Data REST

Spring Data REST is part of the Spring Data project. It offers an easy and fast way to implement RESTful Web Services with Spring. To start, using Spring Data REST you have to add the following dependency to the pom.xml file:

<dependency>  <groupId>org.springframework.boot</groupId>  <artifactId>spring-boot-starter-data-rest</artifactId></dependency>

By default, Spring Data REST finds all public repositories from the application and creates automatically RESTful Web Services for your entities.

You can define the endpoint of service in your file:

Now you can access the RESTful web service from the localhost:8080/api endpoint. By calling the root endpoint of the service ...

Get Hands-On Full Stack Development with Spring Boot 2.0 and React now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.