1:正确写法

@RequestMapping("{type_key}.html")
public String geren(Model model, @PathVariable String type_key) {
List<EmployeeModel> emplist = employeeService.selectOnjobEmployee();
model.addAttribute("type_key", type_key);
model.addAttribute("emplist", emplist);
return "/front/e/aaa";
}

2:正确写法

@RequestMapping("/ama")
public ModelAndView lists(ModelAndView mv) {//import org.springframework.web.servlet.ModelAndView;

 


mv.setViewName("/back/b");
return mv;
}

 

import org.springframework.web.portlet.ModelAndView;跳转无效

 

引包时候一定注意了是servlet不是portlet

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-09-19
  • 2021-09-15
  • 2021-05-21
  • 2021-12-05
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-02-12
  • 2021-07-28
  • 2021-06-15
  • 2022-01-04
  • 2021-09-07
  • 2021-08-10
  • 2022-12-23
相关资源
相似解决方案