This project is a Book Ordering Microservice built using Spring Boot. It demonstrates various design patterns and includes features such as authentication using Keycloak, API Gateway, service discovery, and OpenFeign for communication between microservices.
- Microservices Architecture: Each component of the application is designed as an independent microservice.
- Authentication: Secure user authentication and authorization using Keycloak.
- API Gateway: A gateway to route requests to the appropriate microservices.
- Service Discovery: Utilizes Spring Cloud Netflix Eureka for service discovery.
- OpenFeign: Simplifies HTTP client creation for inter-service communication.
- Design Patterns: Incorporates various design patterns to enhance code structure and reusability.
The architecture of the system is based on microservices that interact with each other through well-defined APIs. Below is a high-level overview of the architecture:
- Spring Boot
- Spring Cloud
- Keycloak
- Eureka
- OpenFeign
- Maven
- Java 11 or higher
- Maven
- Keycloak Server (for authentication)
- Docker (optional)
-
Clone the repository:
git clone https://github.com/KarnamShyam1947/springboot-microservices.git cd springboot-microservices -
Set up Keycloak:
Follow the Keycloak documentation to set up your Keycloak server. Create a realm and configure the necessary clients and roles.
-
Build Project
mvn clean install
Update the application.yml or application.properties files with the necessary configuration for your environment, including Keycloak details, database configuration, etc.
Once the microservices are up and running, you can interact with the API Gateway to place orders, manage users, and perform other operations.