Review a Spring MVC @RequestMapping and @PathVariable example.
@RequestMapping("/site")
public class SiteController {
@RequestMapping(value = "/{q}", method = RequestMethod.GET)
public ModelAndView display(@PathVariable("q") String q) {
logger.debug("Site : q : {}", q);
return getModelAndView(q, "site");
}
}