Skip to content

sarialem/player-microservice

Repository files navigation

player-microservice

A Spring based REST API that exposes 2 endpoints to read player data, it import this data from the player.csv file after startup.

Exposed Endpoints:

You can check out and try the API using it's exposed swagger ui on the following url: http://localhost:8080/swagger-ui.html

Running the service

Requirements

you can run it using docker-compose, so you need that:

  • docker with docker-compose installed
  • Port 8080 to available and not used by anything else

Running it

In the project's root directory, Build then run using docker-compose:

docker-compose build
docker-compose up

The service should be running on port 8080

Running the tests

Requirements

  • JDK19

Running them

If you are using linux/mac, In the root of the project run:

./gradlew test

If you are using windows,In the root of the project run:

gradlew.bat test

How does it work

  • Built using the Spring Boot framework
  • On Startup, it uses Spring Batch to run a batch job that imports the file Players.csv into an in-memory database
  • Using Spring Rest, it exposes the two endpoints mentions above
  • Uses springdoc's openapi library to expose OpenAPI spec along with Swagger UI

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published