Skip to content

ba23-python/user-management-client-master

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 

Repository files navigation

πŸ§‘β€πŸ’» User Management REST API

This application is a CRUD REST API for managing users.


πŸ› οΈ Technologies

  • Java 17
  • Spring Boot
  • Spring Data JPA
  • MySQL
  • Maven
  • Swagger UI
  • Lombok

πŸ“¦ API Endpoints

Method URL Description
POST /api/users Create a user
GET /api/users/{id} Get user by ID
GET /api/users Get all users with search, sort, and pagination
PUT /api/users/{id} Update user
DELETE /api/users/{id} Delete user

πŸ§ͺ Sample JSON (for POST/PUT requests)

{
  "firstName": "John",
  "lastName": "Doe",
  "dateOfBirth": "1990-05-19",
  "phoneNumber": "1234567890",
  "email": "john@example.com"
}

▢️ How to Run the Project

βœ… Prerequisites

Make sure the following tools are installed:

  • Java 17 or later
  • Maven 3.8+
  • MySQL Server
  • IntelliJ IDEA (recommended)

πŸ—„οΈ Database Setup

  1. Create a new MySQL database:
CREATE DATABASE userdb;
  1. Configure your database in application.properties:
spring.datasource.url=jdbc:mysql://localhost:3306/userdb
spring.datasource.username=your_mysql_username
spring.datasource.password=your_mysql_password
spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect

🧰 Build & Run the Application

  1. Clone the repository:
git clone https://github.com/your-username/user-management-api.git
cd user-management-api
  1. Build the project:
mvn clean install
  1. Run the application:
mvn spring-boot:run

The application will start on:

http://localhost:8080

πŸ“„ API Documentation

Once the application is running, access the Swagger UI at:

http://localhost:8080/swagger-ui/index.html

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published