From the course: Complete Guide to Spring MVC

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Handler methods: Method arguments

Handler methods: Method arguments - Spring Tutorial

From the course: Complete Guide to Spring MVC

Handler methods: Method arguments

- [Instructor] Handler Methods: Method Argument. Let's pick a few of those handler method arguments that we listed out above in our previous video and look at examples of implementing them. For those that skip to that video and jump straight into this one, Spring MVC equips your controllers with a toolkit of method arguments, so to say. So you're enabling them to seamlessly extract and process data from incoming HCTP requests. And these arguments serve as like the bridge between your application's logic and the viable information conveyed within the requests. And this allows you to create those dynamic and responsive web applications. So let's start with one of the most common arguments you encounter. That's request parameters. This is where you'll extract data from the URL query string using the annotation RequestParam. And then imagine you want to capture a user's search term or product ID for processing, this is where you would use RequestParam to do so. So this would allow users…

Contents