This is a Spring Boot application for managing users and managers. It provides RESTful endpoints to perform CRUD operations on users and retrieve users based on manager_id.
- Java 11
- Maven
- Spring Boot 2.5.3
- H2 Database (for development)
- Clone the repository:
git clone
css Copy code
- Navigate to the project directory:
cd spring-boot-application
arduino Copy code
- Build the project using Maven:
mvn clean install
markdown Copy code
- Run the application:
mvn spring-boot:run
markdown Copy code
Once the application is running, you can access the following endpoints:
/api/create_user
- POST method to create a new user. Provide a JSON body with user details (full_name, mob_num, pan_num, manager_id)./api/get_users
- POST method to retrieve user records. You can pass mob_num, user_id, or manager_id in the request body to filter users./api/delete_user
- POST method to delete a user. Provide either user_id or mob_num in the request body./api/update_user
- POST method to update user details. Provide user_ids and update_data in the request body.
The application uses an H2 in-memory database for development. You can access the H2 console at http://localhost:8080/h2-console
(default JDBC URL: jdbc:h2:mem:testdb
).
- Spring Boot Starter Web
- Spring Boot Starter Data JPA
- H2 Database
- Spring Boot Starter Test