This project is a technical challenge to implement CRUD operations through the development of a REST API for user management, it serves as a practical exercise to demonstrate proficiency in REST API development.
This project is a technical challenge to implement CRUD operations through the development of a REST API for user management.
The API receives and returns values in JSON format. It allows users to create, read, update, and delete User entities. Each User entity has a name, surname, and birthdate.
The API is built using Java 17, Spring Boot 2.7, and an in-memory database. It is designed to be easy to set up and run, with detailed instructions provided in the "How to Run" section.
The system provides the following features:
- Get all users, with pagination and sorting
- Get user by ID
- Create new user
- Modify user
- Delete user
- User
- ID
- Name
- Lastname
- Created At (DB Entity level)
- Updated At (DB Entity level)
The API is built with Java 17, Spring Boot 2.7, Spring JPA, and H2 Database.
The development of this project was organized into the following tasks, each represented by a GitHub issue:
- Implement User Entity with Basic Attributes
- Create Endpoint to Retrieve All Users
- Create Endpoint to Retrieve a User by ID
- Create Endpoint to Add a New User
- Create Endpoint to Update User Information
- Create Endpoint to Delete a User
- Create JUnit Tests for User Controller Endpoints
- Add Swagger UI for API Documentation
- Java 17
- Clone the repository to your local machine.
git clone git@github.com:talesmousinho/user-demo.git
- Navigate to the project directory.
cd user-demo/
- Build the project using Maven.
./mvnw clean install
- Run the Spring Boot application.
java -jar target/user-demo-server-0.0.1-SNAPSHOT.jar
The application will start running at http://localhost:8080.
Swagger UI is integrated for easy testing and interaction with the API. To access Swagger UI, once the application is running, visit http://localhost:8080/swagger-ui.html in your web browser.