A RESTful Blog Application built using Java and Spring Boot. The application provides APIs for managing posts, categories, users, and comments, with authentication and authorization using Spring Security and JWT.
- User registration and authentication
- JWT-based authentication and authorization
- Create, read, update, and delete blog posts
- Manage categories
- Manage comments
- Search posts
- Pagination and sorting
- Category-based post filtering
- Image upload
- Request validation
- Exception handling
- Swagger/OpenAPI API documentation
- Java
- Spring Boot
- Spring MVC
- Spring Data JPA
- Hibernate
- Spring Security
- JWT
- MySQL
- REST API
- Maven
- Swagger/OpenAPI
The application follows a layered architecture:
- Controller — Handles HTTP requests and responses
- Service — Contains business logic
- Repository — Handles database operations
- Entity — Represents database tables
- Exception — Handles application exceptions
- Security — Handles authentication and authorization
MySQL is used as the database.
Spring Data JPA and Hibernate are used for database interaction and object-relational mapping.
Spring Security and JWT are used to secure the REST APIs.
Authentication is performed using JWT tokens, and authorization controls access to protected resources.
Swagger/OpenAPI is used to document and test the REST APIs.
After starting the application, open the Swagger UI URL configured by the application.
git clone https://github.com/ramn-x/blog-application.gitOpen the project in IntelliJ IDEA or another Java IDE.
Create a MySQL database and update the database configuration in the application's configuration file.
Run the Spring Boot application using the IDE or Maven.
Use Swagger/OpenAPI or Postman to test the REST APIs.
- Add automated tests
- Add deployment
- Improve API documentation
- Add frontend integration
Raman Kumar
Java Backend Developer
GitHub: https://github.com/ramn-x