예제 #1
0
  @RequestMapping(value = "/welcome", method = RequestMethod.GET)
  public ModelAndView welcome(Model model) {
    LOG.debug("move to welcome page");

    model.addAttribute("object", "Test string");
    ModelAndView modelAndView = new ModelAndView("welcome");
    return modelAndView;
  }
예제 #2
0
@Controller
public class RootController {

  private static final LoggerWrapper LOG = LoggerWrapper.get(RootController.class);

  @RequestMapping(value = "/", method = RequestMethod.GET)
  public String root() {
    LOG.debug("redirect from root to welcome");
    return "redirect:welcome";
  }

  @RequestMapping(value = "/welcome", method = RequestMethod.GET)
  public ModelAndView welcome(Model model) {
    LOG.debug("move to welcome page");

    model.addAttribute("object", "Test string");
    ModelAndView modelAndView = new ModelAndView("welcome");
    return modelAndView;
  }
}
예제 #3
0
 @RequestMapping(value = "/", method = RequestMethod.GET)
 public String root() {
   LOG.debug("redirect from root to welcome");
   return "redirect:welcome";
 }