@RequestMapping("")
    public ModelAndView index(HttpSession session) {
        Object data = session.getAttribute("user");
        ModelAndView view = new ModelAndView("main/index");
        view.addObject("message", "验证失败,正在跳转中...");
        if (data != null) {
            return view;
        } else {
            return view;            
        }
    }
  @RequestMapping(value = "test", method = RequestMethod.GET)
    public String test(Model model) {
        model.addAttribute("parametername", "handsome");
        return "test";
    }

 

相关文章:

  • 2022-01-23
  • 2022-12-23
  • 2022-01-09
  • 2021-11-02
  • 2021-11-30
  • 2022-12-23
  • 2021-08-06
  • 2021-11-15
猜你喜欢
  • 2021-08-23
  • 2021-11-23
  • 2021-04-27
  • 2021-08-30
  • 2022-02-25
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案