From the course: Extending, Securing, and Dockerizing Spring Boot Microservices

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Identify transactional business services boundaries

Identify transactional business services boundaries

From the course: Extending, Securing, and Dockerizing Spring Boot Microservices

Start my 1-month free trial

Identify transactional business services boundaries

- [Instructor] So now we're going to look at the benefits and simplicity of using spring transactions. I already have the app up and started, and I want to see all the ratings for a tour with an ID of one. In Postman, I want to get all the tour ratings for tour one. And I see there is one for customer ID of four with a score of five, and they loved it. Now I want to invoke an API. We're going to give a score of three to tour one for customers with IDs one, two, three, four, five, and six. And we get an internal server error with a constraint violation exception on tour rating. So let's debug this. Why is this happening? So here is our method to post to the score and the tour ID and a list of customers, which invokes the tour rating service to rate many customers for a particular tour, and if we drill down into that service, here's where we take the tour ID and the score and the list of customers, and we will iterate…

Contents