
Explore building microservice REST APIs with Spring Data REST and Spring Boot, implement paging, sorting, custom finders, projections, and security; test with Postman and view docs via the HAL browser.
Explore how this spring data rest course is organized into sections with short lectures, quizzes, assignments, and hands-on practice to build end-to-end microservice projects.
Install the latest JDK and set up Spring Tool Suite for Eclipse, then configure STS to use the JDK by pointing to the JDK home directory.
Install MySQL and MySQL Workbench with a three-step process: download the installer, install the server and Workbench, and set a root password. Connect via the GUI on port 3306.
Launch MySQL Workbench, create a new connection to localhost:3306 with user root, test the connection, then open a query window and create a database named my DB.
Download and install the MySQL community server on Windows, selecting the server component and setting a root password, noting visual C++ prerequisites, port 3306, and password encryption.
Install MySQL Workbench on Windows, launch the GUI client, and connect to a MySQL server. Create and use a database, run queries to show databases and tables.
Install Postman, launch the app, and use its rest client to test your microservices' api. Learn to send get, post, put, patch requests with headers, json bodies, and basic authentication.
Download the completed projects for the REST APIs using Spring Data REST course from the resources section, unzip the file, and code along with me using the three key projects.
Complete the end-of-section assignments to evaluate your knowledge and submit them for review. Download the pdf with code and configuration from the lecture resources for reference, and work from scratch.
When Maven shows errors, delete the local dotm2 repository from your user directory, then run a maven update project to pull dependencies and sync the pom.xml.
Explore Spring Boot 2.2.5 or the latest versions, switch JPA IDs from auto to identity, and secure passwords with encoders or Noop, using sample employee and event APIs.
Explore how micro services are small, autonomous, and focused, contrasting them with monolithic apps like hospital management; learn how services expose APIs and communicate via network calls for independent deployment.
Explore microservices characteristics such as heterogeneity, robustness, scalability, easy deployment, and reusability in a hospital management context, using cross-language modules and REST-based communication across Java, Python, Node.js, and .NET.
Explore how microservices extend SOA to address the monolithic application by splitting it into tiny services, while noting the end-to-end business functionality goal and implementation across vendors.
Learn how rest provides a uniform interface with http methods to create, read, update, and delete resources, and how collection versus item endpoints support multiple data formats via mime types.
Learn how HATEOAS uses hyper media as engine of application state and how HAL implements its link structure, including self links to navigate a REST API with Spring Data REST.
Explore why rest suits microservices with a single interface and stateless design, enabling interlanguage communication via http and json or xml, scalability, graceful degradation, and easy replaceability.
Spring data rest simplifies creating restful APIs by exposing CRUD operations on a JPA entity through a repository, with HAL/HATEOAS support, eliminating boilerplate code.
Create an employee table, expose it as a restful web service with Spring Data REST in four steps, configure datasource, and perform CRUD via Postman.
Create the employee table in the mydb database using MySQL Workbench, with id as an auto increment primary key. The table is empty and will be populated in crud lectures.
Launch spring tool suite, create a spring boot project named employee-api with rest repositories, jpa, and mysql dependencies, configure pom.xml and application properties to finish a spring data rest project.
In spring boot 2.x, replace find one with find by id and return optional; check isPresent before get, and use generation type identity for ID fields.
Create the employee domain model as a JPA entity for the single database table, defining id, first name, and last name with getters and setters and marking id with @Id.
Annotate the entity id with @GeneratedValue and set strategy to GenerationType.AUTO so the JPA provider uses the database's auto increment feature.
Create the employee repository interface by extending CrudRepository to enable Spring Data CRUD operations on Employee with a long id.
Configure the data source by adding spring.datasource properties in application.properties to define the JDBC URL, username, and password for the local MySQL database.
Launch a Spring Data REST application, run on embedded Tomcat at localhost:8080, and explore the employee REST resource with HAL/HATEOAS links and the optional profile meta information.
Learn to create an employee resource using post in spring data rest by posting json with first name and last name to /employees, 201 created with auto-generated id and links.
Learn to update employee details with put in spring data rest, showing full-object replacement and null field risks, and introducing patch for partial updates.
See how patch enables partial updates in REST APIs using Spring Data REST, updating only selected fields like the first name from Sarath to John for id 2.
Complete the crud cycle by deleting the first employee via localhost:8080/employees/1, verify with a 404 on subsequent get, and confirm only the remaining record (id 2) exists.
Expose the id field in Spring Data REST by adding a resource id getter, so the serialized json includes the id as resource id without exposing it directly in content.
Configure a custom context path in a spring boot app by setting server.context-path in application.properties, then restart and use the new URL to access resources.
Migrate spring boot 2.x projects by updating dependencies, deleting the local repository, and replacing findOne and delete with findById and deleteById that return optionals; adjust server.servlet.context-path in application.properties.
Build a Spring Data REST powered event management microservice and a RESTful API to create, read, update, and delete events, organizers, venues, and participants, enabling check-in and event start workflows.
Model the organizer, event, venue, and participant entities with primary keys, timestamps, and relationships in an ER diagram, preparing to create tables in MySQL.
Create a MySQL events database, set up four tables: organizer, event, venue, and participant, and use create and drop table scripts to support the event management API.
Create a Spring Boot event management API by generating a new Spring Starter project, defining JPA entities, repositories, and a datasource, then run the application.
Choose to download prewritten entities or hand-code JPA entities with annotations for event management (event, organizer, participant, venue), including an abstract base with id and creator and defined associations.
Define a base abstract JPA entity with id and created fields. Create an event entity with name, description, start time, end time, zone id, started flag, using Hibernate annotations.
Define venue, organizer, and participant entities for a Spring Data REST API by extending the abstract entity, adding fields, generating getters and setters, and preparing relationships to be defined later.
Defines the entity relationships in REST APIs: an organizer has many events, events have many participants and a venue, and participants belong to an event, with JPA annotations.
Mark the abstract entity with id and creation timestamp using JPA annotations, and define event relationships to organizer, participants, and venue with fetch, cascade, and orphan removal settings.
Annotate and map the participant and organizer to the event using JPA annotations, including many-to-one and one-to-many with eager fetch, join columns, and non-nullable constraints.
Override equals and hashCode using the entity ID as the primary key to ensure correct comparisons, using java.util.Objects for both and applying these across event, organizer, participant, and venue entities.
Mark events, organizer, participant, and venue as JPA entities using the entity annotation; fix address2 spelling; rename getters and setters; and remove cascade all from event to preserve the organizer.
Create repositories for all entities to expose them as RESTful resources and enable CRUD operations via Spring Data REST, including event, organizer, participant, and venue repositories.
Configure the data source to connect to the events database by updating application.properties and mapping the context to the Event Management API.
Upgrade Hibernate to 5.2.10.Final, add Jackson JSR 310, and implement a converter with @EntityScan to enable serialization and deserialization of java.time types in REST.
Launch the event management api by stopping the running employee-api, then run the app as a Spring Boot application deployed on embedded Tomcat and exposed at the given context.
Test event management API with Postman by creating an organizer and then an event with embedded venue data, using Spring Data REST. Learn to customize link exposure in one step.
Learn to embed a venue within an event by using RestResource export = false in Spring Data REST, enabling venue creation as part of the event.
Create a participant via a POST request, link it to the first event with a URI, and use HAL and HATEOAS navigation to related resources.
Update an existing event using a put request on the item resource (event ID 2), changing the name and venue, with a 200 OK response and verified database updates.
Delete an event and cascade its associations by performing a delete on an item resource, receiving a 204 no content response, and verifying removal in the database.
Expose resource IDs in the Spring Data REST API by adding a getResourceId method to each entity so IDs serialize in responses.
Explore paging and sorting in Spring Data REST by extending a paging and sorting repository, and navigate links like first, next, last, with page size, total elements, and total pages.
Enable paging and sorting in the restfully micro service by replacing CrudRepository with Spring paging and sorting repository in the event, organizer, and venue repositories.
Explore how paging works in spring data rest by adding records, adjusting page size, and navigating through first, next, last links.
Configure the default page size for Spring Data REST by setting spring.data.rest.default-page-size in application.properties, ensuring lists show a fixed number of records when no query parameter is provided.
Sort resources by id, name, or description using the sort parameter, apply ascending or descending orders, and combine multiple properties for complex ordering with Postman examples.
Learn to customize json output in Spring Data REST by using Jackson annotations to control field order, skip fields, and bring resource id to the top of responses.
Learn to use Jackson annotations @JsonIgnore and @JsonProperty in Spring Data REST to hide the created field and rename properties such as description to DESC.
Explore how Spring Data REST exposes the standard find one and find all methods, and how custom finder methods on CrudRepository or PagingRepository auto generate queries returning lists or pages.
Explore Spring Data finder methods by adding a findByName in the event repository; return a list of events using camel case and @Param, tested via Postman without query.
Enable paging for repository finders by returning a page and accepting a pageable parameter, so Spring Data REST adds paging links and page size control.
Learn to implement finder methods that filter by multiple properties, such as name and zone ID, using Spring Data REST method naming and paging support.
The ONLY Course That Covers Spring Data REST Comprehensively!
What Students Are Saying
“Excellent course! This course covers everything you need to know to get started with Spring Data REST. Using this architecture simplifies the creation of REST APIs.”
— Renato Santos
“Excellent course. Interesting, practical, hands-on, relevant, and engaging. The instructor makes Spring Data REST easy to learn and use.”
— Glyn Davies
“I am fully satisfied with your lectures. Outstanding. You are simply awesome!”
— Prasad Palla
Why Take This Course?
Complete source code available for download
Responsive instructor — all questions answered within 24 hours
Professional-quality video and audio recordings
Hands-on projects, quizzes, and assignments
Learn by building real-world applications from scratch
Do you have data that you’d like to expose through RESTful web services? Are you a Java Spring developer interested in learning one of the fastest and most productive ways to build REST APIs? Do you want to create production-ready Microservices in minutes instead of writing repetitive boilerplate code?
If so, this course is for you.
Why Spring Data REST?
Spring is the most widely used Java framework in the industry today, and REST has become the standard for application integration and Microservices communication.
While Spring MVC allows you to build REST APIs, implementing CRUD endpoints manually often involves a significant amount of repetitive code.
Spring Data REST eliminates this boilerplate by automatically exposing your Spring Data repositories as RESTful resources. It also provides built-in support for HATEOAS, hypermedia-driven APIs, paging, sorting, searching, and many other enterprise features with minimal configuration.
Throughout this course, you’ll build a complete end-to-end REST API while gaining a solid understanding of Microservices, REST principles, HATEOAS, and Spring Data REST.
You’ll also learn how Spring Data REST transforms your data access layer into production-ready JSON APIs that can be consumed by modern web and mobile applications.
What You’ll Learn
By the end of this course, you’ll be able to:
Master the fundamentals of Microservices, REST, and Spring Data REST.
Build RESTful APIs using Spring Data REST with minimal code.
Develop a complete end-to-end REST API application from scratch.
Test REST APIs using Postman.
Implement Paging and Sorting.
Customize JSON responses.
Create custom search APIs using Spring Data.
Add business logic using custom REST controllers.
Use Projections and Excerpts to expose different views of your data.
Enable HAL Browser support for exploring REST APIs.
Secure your APIs using Authentication and Authorization.
Understand HATEOAS and build hypermedia-driven REST services.
Build production-ready APIs using Spring Boot and Spring Data REST.
Everything is taught through simple, practical, step-by-step demonstrations that you can immediately apply to your own projects.