The architecture builds up from a Redis cache, MySQL server and the Spring Boot application.
- Run Redis and MySql services docker-compose -f docker-compose-redis-mysql.yaml up
- Build the jar file ./mvnw clean install
- Rebuild Docker image docker-compose build --no-cache
- Start the architecture docker-compose up
- Endpoint available at: http://localhost:8080/movies
omdb.apiKey=[YOUR_API_KEY]
omdb.apiBaseUrl=http://www.omdbapi.com
omdb.pageSize=10 # page size as omdb does not provide paging information in the response
themoviedb.apiKey=[YOUR_API_KEY]
themoviedb.apiBaseUrl=http://api.themoviedb.org/3
# 0 means we don't have a threshold, we query all pages
movieinfo.pagesThreshold=0
- movies: returns with a list of movies(title, year if presented, director if presented) matching the search patter using the selected provider
-
{ movies: [ { "Title": "Dennis the menace", "Year": 1993, "Director": "Nick Castle" }, { "Title": "Dennis the menace 2", "Year": 1995, "Director": [ "Nick Castle", "Other Director" ] }, { "Title": "Dennis the menace 300", } ] }
-
- api: type of provider to use [omdb, themoviedb]
- searchTerm: search string movie should match
http://localhost:8080/movies/{searchTerm}?api={api}
http://localhost:8080/movies/Dennis?api=omdb
http://localhost:8080/movies/Dennis?api=themoviedb
http://localhost:8080/movies/Dennis%20the%20meanace?api=themoviedb
http://localhost:8080/movies/Dennis+the+menace?api=themoviedb