May 2015
Intermediate to advanced
234 pages
4h 18m
English
In this recipe, you will learn how to define a controller method to be executed for a given route.
Here are the steps for creating a controller method for a given route:
com.springcookbook.controller). This is a normal Java class annotated with @Controller:@Controller
public class UserController {
...
}@RequestMapping, which takes the route as a parameter:@RequestMapping("/user/list")
public void userList() {
...
}A request with the /user/list route will execute the userList()method.
Read now
Unlock full access