This is a RESTful API for managing blogs, built using Java.
- Create, Read, Update, and Delete blog posts.
- Search blogs by ID.
- Shows blogs with Pagination.
- Java 21 (Recomended) or later
- Maven 3.9.9 or later
- A database (e.g., MySQL, PostgreSQL)
-
Clone the repository:
git clone https://github.com/5OBHAN/Blog-Management-Restful-API.git && cd Blog-Management-Restful-API
-
Configure the database connection in
application.properties
:Path: src/main/resources/application.properties
spring.datasource.url=jdbc:mysql://<HOST>:<PORT>/{YOUR_DB_NAME} spring.datasource.username={YOUR_DB_USERNAME} spring.datasource.password={YOUR_DB_PASSWORD}
-
Build and run the application:
mvn clean install mvn spring-boot:run
POST /api/v1/blogs
- Create a new blog postGET /api/v1/blogs/{id}
- Get a single blog post by IDGET /api/v1/blogs
- Get all blog postsPUT /api/v1/blogs/{id}
- Update a blog post by IDDELETE /api/v1/blogs/{id}
- Delete a blog post by ID
This project is licensed under the MIT License. See the LICENSE file for details.