This repository contains a simple CRUD (Create, Read, Update, Delete) API implemented using Spring Boot. The API allows you to perform basic operations on a data resource, such as creating new entries, retrieving existing entries, updating entries, and deleting entries.
To get started with this API, follow the instructions below.
- Java Development Kit (JDK) 8 or higher
- Maven
-
Clone the repository to your local machine:
git clone https://github.com/SirBento/spring-boot-crud-api.git ``` -
Navigate to the project directory:
cd spring-boot-crud-api ```
-
Build the project using Maven:
mvn clean install ```
Once you have successfully built the project, you can run it using the following command:
mvn spring-boot:runBy default, the API will run on http://localhost:8080. You can access the API endpoints using a tool like cURL or a web client of your choice.
The following API endpoints are available:
GET /api/resource- Retrieve all entries.GET /api/resource/{id}- Retrieve a specific entry by ID.POST /api/resource- Create a new entry.PUT /api/resource/{id}- Update an existing entry.DELETE /api/resource/{id}- Delete an entry.
Please note that for POST and PUT requests, you should include a JSON payload in the request body with the necessary data.
The API can be configured by modifying the application.properties file in the src/main/resources directory. You can change the database connection settings, server port, and other properties as needed.
If you find any issues with the API or have suggestions for improvements, please feel free to open an issue or submit a pull request. Your contributions are welcome!
This project is licensed under the MIT License.
This project was inspired by the need for a simple CRUD API implementation using Spring Boot. It serves as a starting point for building more complex applications.
If you have any questions or need further assistance, please feel free to contact me at bernardtowindo38@gmail.com.
Enjoy using the Spring Boot CRUD API!