The objective of this technical assessment is to develop a REST Web API using the following technologies:
- Java
- Spring Boot
- JPA for database access (Spring Data or Hibernate) [optional]
- PostgreSQL
- Maven
The primary goal is to create an API for managing matches and their odds. This involves handling information related to matches and their associated odds.
To run the application using Docker Compose, follow these steps:
-
Make sure you have Docker and Docker Compose installed on your system. If not, you can download and install them from the official Docker website.
-
Navigate to the
TechnicalAssesmentdirectory in your terminal or command prompt. -
Use the following command to start the application:
docker-compose up -d- Wait for the containers to start. You can monitor the progress by checking the logs:
docker-compose logs -f-
Once the containers are up and running, you can access the application at http://localhost:8080
-
To stop the application and remove the containers, use the following command:
docker-compose downYou can find the detailed Rest Web API documentation at:
http://localhost:8080/swagger-ui/index.html
id: Unique identifier for the match.description: Description of the match.match_date: Date of the match.match_time: Time of the match.team_a: Name of Team A.team_b: Name of Team B.sport: Type of sport (Enum with values: Football, Basketball).
id: Unique identifier for the odds.match_id: Identifier linking the odds to a specific match.specifier: Specifier for the odds.odd: Odds value.
Enum to store the Sports values. (Football, Basketball)
Controller class for handling HTTP requests related to matches. Provides endpoints for performing CRUD operations on Match entities.
Controller class for handling HTTP requests related to MatchOdds. Provides endpoints for performing CRUD operations on MatchOdds entities.
Repository interface for performing CRUD operations on Match entities.
Repository interface for performing CRUD operations on MatchOdds entities.
Service interface for handling operations related to matches.
Implementation of MatchService.
Service interface for handling operations related to match odds.
Implementation of MatchOddsService.
Tests for Match Service use cases.
