Blog REST API using Spring Boot, H2 Database and Gradle
- CRUD operations for posts
- CRUD operations for comments
- CRUD operations for authors
- Create/View nested comments
- Validation and error handling
- Clone the repository
git clone https://github.com/shldhll/Content.git - Open project and sync gradle
- Build and run the application using
gradlew bootRuncommand
| METHOD | REQUEST URL | DETAILS |
|---|---|---|
| POST | /post | Add a post |
| GET | /post | Get all the posts |
| GET | /post/{id} | Get a post by ID |
| PUT | /post | Update a post |
| DELETE | /post/{id} | Delete the post with the given ID |
| METHOD | REQUEST URL | DETAILS |
|---|---|---|
| POST | /comment | Add a comment |
| GET | /comment/post/{id} | Get all comments for the given post ID |
| GET | /comment/{id} | Get comment by ID |
| PUT | /comment | Update a post |
| DELETE | /comment/{id} | Delete the comment with the given ID |
| METHOD | REQUEST URL | DETAILS |
|---|---|---|
| POST | /author | Add an author |
| GET | /author | Get all authors |
| GET | /author/{id} | Get author by ID |
| PUT | /author | Update an author |
| DELETE | /author/{id} | Delete the author with the given ID |