From the course: Spring: Spring MVC

Unlock the full course today

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

Create a controller with request mapping

Create a controller with request mapping

From the course: Spring: Spring MVC

Start my 1-month free trial

Create a controller with request mapping

- Let's start implementing the search use case now, but before that, I'm going to make a few changes on com.test.hplus I'm going to create another package. Let's label it config and let's drag application config onto that folder. This is just so that everything looks neat and we know which class goes into which folder. Right, so that's config. And another thing to note, if you look under external libraries, you will be able to see all the dependencies, all the jar files that your project is dependent on. So that'll include Spring boot, Spring MVC, everything. We're going with 5.1.9 release for this course. So let's go ahead and execute steps for the search use case now. We have to create a SearchController and provide a GetMapping for it. So let's do that. Let's go to hplus app and under controller, I'll create a class called SearchController and let's annotate it with the controller annotation and put a…

Contents