Blog Project Spring Boot REST API's
- Java 8+
- Spring Boot
- Spring MVC
- Spring Data JPA ( Hibernate)
- Spring Security
- JWT
- Tomcat
- Intellij IDEA
- MySQL database
- Swagger - API documentation
- Postman - Test REST API
- Maven - Build Tool
- AWS
MySql --> create database myblog;
- REST API's Design for Blog Application
- Building CRUD REST API's for Post Resource
- Pagination and Sorting Support
- Building CRUD REST API's for Comment Resource
- Using ModelMapper-Map Entity to DTO and Vice Versa
- Exception Handling in Spring Boot App
- Spring Boot REST API Validation
- Securing REST API's
- Log in / Sign in and Register / Sign up REST API's
- JWT ( Json Web Tokens) - Securing REST API's with JWT
- Versioning REST API's
- Swagger REST API Documentation
- Deploying Spring Boot Blog App on AWS Cloud
- Versioning through URI Path
- One way to version a REST API is to include the version number in the URI path.
- Versioning through query parameters
- Another option for versioning a REST API is to include the version number as a query parameter.
- Versioning through custom headers
- REST APIs can also be versioned by providing custom headers with the version number included as an attribute.
- The main difference between this approach and the two previous ones is that it doesn’t clutter the URI with versioning information.
- http://localhost:8080/api/products headers=[X-API-VERSION=1]
- http://localhost:8080/api/products headers=[X-API-VERSION=2]
- Versioning through content negotiation
- The last strategy we are addressing is versioning through content negotiation.
- In this approach, we use the Accept header in the request.
- http://localhost:8080/api/products headers[Accept=application/vnd.javaguides-v1+json]
- http://localhost:8080/api/products headers[Accept=application/vnd.javaguides-v2+json]
Swagger is used for answer those questions between REST API Developer and REST API Consumer
- What are rest endpoints available
- What is response codes
- What is dto structure
- What are error codes
- What are HTTP methods
- What are standart error messages