@RequestMapping associates a controller action—a method—with a specific HTTP request. Its path value tells Spring which URL should invoke that action. section 7.3
Map the home page
Annotate a controller method with @RequestMapping("/home") and have it return "home.html". A browser request to /home invokes the method, and the app sends the HTML page as its response. section 7.3
Listing 7.5 The definition of the controller class
@Controller #A
public class MainController {
@RequestMapping("/home") #B
public String home() {
return "home.html"; #C
}
}See the complete controller example, including the class annotation, request path, and returned page name. section 7.3


