同一个Controller下

  @RequestMapping("/add")
    public String add( Major major) {
        boolean result = majorIBaseService.add(major);
        if (result) {
            // 添加成功跳转展示Page
            return new String("redirect:selectListPage") ;
        } else {
            // 添加失败,回到添加方法
            return new String("redirect:addPage");
        }
    }
// 添加成功
  @RequestMapping("/selectListPage")
    public String selectListPage(Model model)  {
        // 获取到所有的院系,发送到页面,
        // do something...
    }

相关文章:

  • 2021-09-24
  • 2022-12-23
  • 2021-06-16
  • 2021-07-14
  • 2021-07-20
  • 2022-12-23
  • 2021-11-05
猜你喜欢
  • 2021-10-21
  • 2022-12-23
  • 2022-01-01
  • 2021-11-05
  • 2021-06-13
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案