Implementing a REST API can be easy or it can be a headache if we do not use proper tools or technologies. In this article, I implemented a simple REST API using Spring Boot and Spring MVC to help beginners get started.
The REST API in this example exposes the CRUD operations of a User entity. By using the “ResponseEntity” API of Spring, writing API service can be done in a single line statement and it is very easy to understand.
You can check the live programming of creating this API on my YouTube Channel. https://www.youtube.com/watch?v=8a8BwpyFujU&t=1674s
You can also download the source code on my Github account.
https://github.com/asoorkeea/spring-restapi-p1
Once the API service has been created, I also demonstrate 2 ways to test the API without have to develop JUnit tests or a UI interface. The objective is really to get something up and running very quickly and provide front-end developers with something to work on for the UX/UI.