Ejemplo n.º 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;
  }
Ejemplo n.º 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;
  }
}
Ejemplo n.º 3
0
 @RequestMapping(value = "/", method = RequestMethod.GET)
 public String root() {
   LOG.debug("redirect from root to welcome");
   return "redirect:welcome";
 }