October 2017
Intermediate to advanced
396 pages
10h 2m
English
Spring MVC allows you to use the @RequestMapping annotation at the method level to make this method as handler method in the Spring web application. Let's see how to use it in the following class:
package com.packt.patterninspring. chapter10.bankapp.web.controller; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import com.packt.patterninspring.chapter10.bankapp.model.User; @Controller public class HomeController { @RequestMapping(value = "/", method = RequestMethod.GET) public String home (){ return "home"; } @RequestMapping(value = "/create", ...Read now
Unlock full access