From the course: Build Spring Boot Apps with the Kotlin Programming Language

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Step 3: Explaining the challenge

Step 3: Explaining the challenge

- [Instructor] So now then the last bit of code I'm going to leave for you to write again. And this is the one that does the booking. I think I'll write the controller code with you and then leave you to write the code that that controller is going to call. So we'll just stop this running for a moment. Again, follow along with me. So were going to have a function called bookASeat. That function is going to take an instance of the bean again. And it's going to be returning a model and view. Let's put the at to request mapping and atational before we go any further. And so the value is going to be booking. That's the name of the url that we post to and this is going to be posted so we'll need the method equals array of request method post. I'm going to just copy it from up there. In here what we'd like to do is say, go to our booking service, call a function which you're going to write, called reserve seat. In there we'll need to pass in an instance of the seat, an instance of the…

Contents