https://github.com/5obhan/blog-management-restful-api
A Blog Management RESTful API using Java Spring Boot that allows users to create, retrieve, and manage blogs.
https://github.com/5obhan/blog-management-restful-api
apache-maven api blog blog-api java java-spring-boot java-spring-mvc java-springboot maven mvc-architecture mvc-framework rest-api restful restful-api spring-boot spring-mvc
Last synced: about 2 months ago
JSON representation
A Blog Management RESTful API using Java Spring Boot that allows users to create, retrieve, and manage blogs.
- Host: GitHub
- URL: https://github.com/5obhan/blog-management-restful-api
- Owner: 5OBHAN
- License: mit
- Created: 2025-03-28T18:16:29.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2025-03-28T20:31:19.000Z (about 2 months ago)
- Last Synced: 2025-03-28T20:33:42.809Z (about 2 months ago)
- Topics: apache-maven, api, blog, blog-api, java, java-spring-boot, java-spring-mvc, java-springboot, maven, mvc-architecture, mvc-framework, rest-api, restful, restful-api, spring-boot, spring-mvc
- Language: Java
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Blog Management Restful API
This is a RESTful API for managing blogs, built using Java.
## Features
- Create, Read, Update, and Delete blog posts.
- Search blogs by ID.
- Shows blogs with Pagination.## Getting Started
### Prerequisites
- Java 21 _(Recomended)_ or later
- Maven 3.9.9 or later
- A database (e.g., MySQL, PostgreSQL)### Installation
1. Clone the repository:
```sh
git clone https://github.com/5OBHAN/Blog-Management-Restful-API.git && cd Blog-Management-Restful-API
```2. Configure the database connection in _`application.properties`_:
> **Path:** src/main/resources/application.properties
```properties
spring.datasource.url=jdbc:mysql://:/{YOUR_DB_NAME}
spring.datasource.username={YOUR_DB_USERNAME}
spring.datasource.password={YOUR_DB_PASSWORD}
```3. Build and run the application:
```sh
mvn clean install
mvn spring-boot:run
```## API Endpoints
### Blog Posts
- `POST /api/v1/blogs` - _Create a new blog post_
- `GET /api/v1/blogs/{id}` - _Get a single blog post by ID_
- `GET /api/v1/blogs` - _Get all blog posts_
- `PUT /api/v1/blogs/{id}` - _Update a blog post by ID_
- `DELETE /api/v1/blogs/{id}` - _Delete a blog post by ID_## License
This project is licensed under the **MIT License**. See the [LICENSE](LICENSE) file for details.