From the course: Creating Spring Boot Microservices

Unlock the full course today

Join today to access over 24,400 courses taught by industry experts.

Solution

Solution

(upbeat music) - [Instructor] Did you figure it out? So on line 15 is the answer. So, we invoke the context.getBean to get the TourManagementService object, and we name that object manager. And then, from manager, we invoke createTour for the Zoo Tour where the price is 100, and it is kid friendly. And then it just prints them out. So, this time, I'm going to show you how to build it and run it from the command line. Make sure that you are in the tour-service folder, and we are on branch 01_05. mvn clean install. So it's going to build it, make sure it downloads any dependencies that it needs, and then we're going to launch the jar. So if you look at the target folder, we've bundled the tour-service, as well as any dependencies, into one jar so we can just do it on one command line. So java -jar target, tour-service, - jar-with-dependencies.jar. And there we printed it, and there is Zoo Tour. Awesome.

Contents