Skip to content

ulrich-matthiae/cloud-flights

Repository files navigation

cloud-flights

An example app using spring cloud and mongo-db to show how one could start to build an online flight booking API.

Testing the app

Dependencies

The following required services need to be started up

  1. Zipkin:
    • Using Docker: docker run -p 9411:9411 openzipkin/zipkin
    • Directly: curl -sSL https://zipkin.io/quickstart.sh | bash -s java -jar zipkin.jar
  2. RabbitMQ
  3. Prometheus
    • In the prometheus directory: docker run -p 9090:9090 -v <full-path>\cloud-flights\prometheus\prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus

Microservices

To get the solution running, the different microservices need to be fired up in this order:

  1. Eureka Server
  2. Config Server
  3. Cost service
  4. Flight service
  5. Booking service
  6. Cloud Gateway

Each of these can be started up by running mvn spring-boot:run in the appropriate directory

Usefull URLs

Creating and querying bookings

POST http://localhost:8201/flights/

{
	"id":"1",
	"flightDate":"2019-01-01",
	"origin":"JOHANNESBURG",
	"destination":"CAPE_TOWN",
	"seatsAvailable":"20"
}

GET http://localhost:8201/flights/1

About

An example app using spring cloud and mongo-db to showcase how one could build an online API for a flight booking site

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages