This repository contains a simple CRUD REST API for managing employees built using Spring Boot and Hibernate. The purpose of this repository is to provide a basic example of how to create a REST API using Spring Boot and Hibernate.
This REST API provides the following endpoints:
-
This endpoint is used to retrieve a list of all employees.
GET /api/employees
-
This endpoint is used to retrieve a specific employee by its ID.
GET /api/employees/{id}
-
This endpoint is used to create new employee.
POST /api/employees
-
This endpoint is used to update a specific employee by its ID.
PUT /api/employees/{id}
-
This endpoint is used to delete a specific employee by its ID.
DELETE /api/employees/{id}
-
To run the projects, you'll need to have Java installed on your machine. You can download Java from the official website.
-
Install an Integrated Development Environment (IDE) such as IntelliJ or Visual Studio Code.
-
To install IntelliJ IDEA, follow the instructions on the official website
-
To install Visual Studio Code, follow the instructions on the official website.
-
To run the application, please follow these steps:
-
Clone the repository using the following command:
git clone https://github.com/aamirxshaikh/spring-boot-hibernate-rest-api.git
-
Navigate into the project directory using the following command:
cd spring-boot-hibernate-rest-api
-
You can simply run the project in the IntelliJ IDEA by clicking the "run" icon or you can run the application using the following command:
mvn spring-boot:run
-
After the application is running, you can interact with the API by making HTTP requests to the endpoints listed above using tools like curl or Postman.
Feel free to contribute to this repository by improving the existing codebase or adding new features. Simply fork the repository, make your changes, and create a pull request. I'll be happy to review and merge your changes.
This repository is licensed under the MIT License. See the LICENSE file for details.