Migrating from Traditional DAO to Spring Data REST with JPA
.png)
Spring Data Rest is a spring boot project but it's like a more advanced and less coding application. There are three new concepts in Spring Data Rest - Configuration It adds 's' automatically to the entity. You can also give path for your URL Add @RepositoryRestResource(path="members") annotation at top of Repository interface. Pagination # change default page size spring.data.rest.default-page-size=3 Sorting http://localhost:8080/magic-api/members?sort=age ---default in ascending http://localhost:8080/magic-api/members?sort=age ---in descending Steps to develop CRUD application- Go to https://start.spring.io/ and kick start your project. Add necessary dependencies like Spring Data JPA, Spring Web, Spring Boot DevTools, MySql Driver, spring-boot-starter-data-rest . Select as maven and enter. Import as maven project and check pom for dependencies we added. Create entity class in entity package and write ...