Challenge - Enhance The TripSearch Microservice

Challenge - Enhance The TripSearch Microservice

In this Challenge, you will build on the provided example and add new methods to extend the functionality.

The microservice, as it stands, allows you to show all trips in the database, and filter by trips that originate from a city. Your Challenge is to extend the service to allow filtering by destination. So you should be able to add the path /tripstocity/Sydney and see only those trips that arrive in Sydney.

  1. Download file dev-tripsearch.zip to the Windows virtual machine and extract
  2. Go to AWS DynamoDB Console.
  • Click Tables
  • Click TravelBuddyTripSectors Enhance The TripSearch Microservice
  1. Click Actions
  • Click Create Index Enhance The TripSearch Microservice
  1. In the Partition Key section, type destinationCity Enhance The TripSearch Microservice
  • Drag the screen down, click Create index
  1. In the Eclipse IDE, right-click on the root element of the dev-tripsearch project
  • Click Show in
  • Click System Explorer Enhance The TripSearch Microservice
  1. Delete the folder src of the root project
  • Copy the contents of the dev-tripsearch project was extracted in the step 1 over to the folder we open in the step 5
  • Click Replate the file in the destination
  1. In the Eclipse IDE, right-click on the root element of the dev-tripsearch project
  • Click Maven
  • Click Update Project Enhance The TripSearch Microservice
  1. Open file swagger.yml
  • Replace the Region and the AccountID by the region we do this lab and your AccountID in the line 34, line 92 and line 150
  1. Open Command Prompt, Execute the below command to navigate to the directory of dev-tripsearch project and to review the changed code files
cd C:\Users\Administrator\git\dev-tripsearch
git status

Enhance The TripSearch Microservice 10. Execute the below command to add in the changed files

git add .
git commit -m “challenge 1”

Enhance The TripSearch Microservice 11. In the Eclipse IDE, right-click on the root element of the dev-tripsearch project

  • Click Team
  • Click Push to origin. Enhance The TripSearch Microservice
  1. Click Close Enhance The TripSearch Microservice
  2. Check the API by hitting the path tripstocity/Sydney. Enhance The TripSearch Microservice