Skip to content

rodneyazev/spring-microservice-configserver-discovery-gateway-school-student-zipkin

Repository files navigation

Spring Boot Logo

Description

Spring Microservice - Config Server + Discovery Server + API Gateway + Schools & Students API's + Zipkin

Docker

Network

# Containers Docker Network Creation

docker network create my-network

Containers

docker-compose up -d

or

docker-compose -f <docker-filename> up -d

- PostgreSQL

# PGAdmin (Local)
Use host.docker.internal or postgres instead of localhost

Zipkin

Zipkin: http://localhost:9411/

API Gateway

Now we can access API's via API Gateway url:

api-service-endpoint:

http://localhost:8222/{api-service-endpoint}

    Schools:     /api/v1/schools
    Students:    /api/v1/students

Endpoints

# - schools

POST -> http://localhost:8222/api/v1/schools

    {
	"name":"My's School",
	"email":"{{$randomEmail}}"
    }



GET -> http://localhost:8222/api/v1/schools/with-students/{id}



# - students

POST -> http://localhost:8222/api/v1/students

{
	"firstname":"{{$randomFirstName}}",
	"lastname":"{{$randomLastName}}",
	"email":"{{$randomEmail}}",
	"schoolId": 1
}

About

spring-microservice-configserver-discovery-gateway-school-student-zipkin

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages