This project demonstrates the use of microservices architecture using Spring Boot 3. It consists of three main services:
- Eureka Naming Server
- Forex Service
- Currency Conversion Service
Each microservice communicates via REST APIs, and the Eureka Naming Server facilitates service discovery.
- Java 17+
- Maven 3.8+
- Spring Boot 3.x
This service acts as a registry where all other microservices register themselves. It also enables the discovery of other services.
This service provides currency exchange rates. It has the following API:
- GET
/forex/from/{from}/to/{to}: Fetches the exchange rate from one currency to another.
This service uses the Forex Service to convert amounts from one currency to another. It has the following API:
- GET
/currency-conversion/from/{from}/to/{to}/quantity/{quantity}: Converts a given amount from one currency to another.
-
Clone the repository:
git clone https://github.com/your-repo/g-boot-basic-microservice.git cd g-boot-basic-microservice -
Run the Eureka Naming Server:
cd spring-boot-microservice-eureka-naming-server mvn spring-boot:run -
Run the Forex Service:
cd ../spring-boot-microservice-forex-service mvn spring-boot:run -
Run the Currency Conversion Service:
cd ../spring-boot-microservice-currency-conversion-service mvn spring-boot:run
- GET
/forex/from/{from}/to/{to}: Fetch the exchange rate from one currency to another. For example:GET http://localhost:8000/forex/from/USD/to/INR
- GET
/currency-conversion/from/{from}/to/{to}/quantity/{quantity}: Convert the given amount from one currency to another. For example:GET http://localhost:8100/currency-conversion/from/USD/to/INR/quantity/1000
This project was developed by the following contributors: