customer api - spring boot application. This api is built with Spring Boot, utilizing MySQL for data storage. It exposes endpoints to manage customer information, including id, first_name, last_name, email, and phone_number. The API is designed to be powerful, scalable, and easy to integrate into your applications.
Note
It's My First Springboot Back-end Project In which I have Implemented Rest API
and also uses postman to test api:)
π Thank you, me, for making it happen! Let's keep coding and building awesome things! π
π Key Achievements:
Developed a RESTful API that showcases my proficiency in Java and Spring Boot.
Successfully handled the integration of MySQL, ensuring data persistence and reliability.
Demonstrated a commitment to best practices, documentation, and a user-friendly API design.
Go to the website Spring Initializr to initialize the Spring Boot project. Add the following dependencies:
Spring Boot DevTools: for the development tools.
Lombok: to reduce boilerplate code (for example, getters and setters).
Spring Web: to embed Apache Tomcat and include Spring MVC.
Spring Data JPA: to facilitate the database layer.
MySQL Driver: to enable communication between the Spring Boot application and the database.
Navigate to the project directory:
Directory Structure
Configure the MySQL database connection in application.properties.
The API will be accessible at http://localhost:8090/customer/save for POST method.
http://localhost:8090/customer/retrieve/email=abc@gmail.com
:= for GET method. Its uses emailId for retrieve the information from database
Testing with Postman
Test the application using Postman.
Add a couple of customers.
Enter the body of the request:
{
"first_name": "rahul",
"last_name": "sharma",
"email": "rs@gmail.com",
"phoneNumber": "9515517878"
}
Select SEND, and rahul sharma will be saved into the database
MySql
The project utilizes the following Tech:
π Tech Stack:
π₯οΈ Java | Spring Boot | Hibernate
π’οΈ MySQL
π RESTful APIs
π§ Git | Maven
All dependencies are managed using Maven.
Screenshorts
GET {retrieve an customer from database using emailID}
Screen2
mysql workbanch
POST {Create an customer}
Usage
Make requests to the specified endpoints using your preferred API client.
Ensure proper authorization and authentication mechanisms are in place.
Integrate the API into your applications to manage customer data efficiently.
Contribution
Contributions are welcome! If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request.
License
This project is licensed under the MIT License.
About
customer api using spring boot framework with a jpa thymeleaf hibernate mysql with this all features created rest api.