This repository contains a collection of microservices for managing a coffee shop system.
Before running the microservices, ensure you have the following prerequisites installed:
- Java Development Kit (JDK) 8 or later
- Maven
- MySQL Server
Clone this repository to your local machine:
git clone https://github.com/your-username/coffee-microservices.git
Navigate to the coffee-inventory-service/src/main/resources directory. Run the schema-inventory.sql script to create the database schema. Run the data-inventory.sql script to populate the database with sample data. Repeat the same steps for the coffee-order-service module using the respective SQL scripts.
Navigate to the coffee-config-server directory. Open the application.properties file and configure the database connection properties. Run the following command to start the configuration server:
mvn spring-boot:run
Navigate to the coffee-eureka-server directory. Open the application.properties file and configure the server port if necessary. Run the following command to start the Eureka server:
mvn spring-boot:run
For each microservice (config, inventory, order, gateway), follow these steps:
Navigate to the respective directory (e.g., coffee-inventory-service). Open the application.properties file and configure the database connection properties, Eureka server details, and server port if necessary. Run the following command to start the microservice:
mvn spring-boot:run
Once all microservices are up and running, you can access the services through the gateway:
Gateway URL: http://localhost:8072
Consult each microservice's API documentation for available endpoints and usage instructions.
Pull requests and contributions are welcome. For major changes, please open an issue first to discuss what you would like to change.
MIT