/microserviceV3

Microservice V3

Primary LanguageJava

Microservice V3

This project is an example of microservice using Spring Boot, Docker and Kafka.

Running the application.

1. Create the MariaDB Docker Image

The folder /scripts has the scripts to create and populate the MariaDB database.

Run the commands below on the root project folder at the same order.

<microserviceV3>$ docker build -t mariadb-custon:latest .
<microserviceV3>$ docker tag mariadb-custon:latest ricardorqr/mariadb-custon
<microserviceV3>$ docker push ricardorqr/mariadb-custon

Here is how to check the database

Table Customer

2. Run application

  1. Run docker

In the root project folder, run the command:

<microserviceV3>$ docker compose up
  1. Run Eureka Server

In the eureka-server project folder, run the command:

<eureka-server>$ mvn spring-boot:run
  1. Run All Services

In each service folder (service-customer, service-fraud and service-notification) without caring about the order, run the command:

<each-project-folder>$ mvn spring-boot:run
  1. Postman
{
  "firstName": "Ricardo",
  "lastName": "Ribeiro",
  "email": "ricardo@gmail.com"
}

3. Links

Resources