我的项目是java spring mvc。我想要特定员工的前端数据列表。
我的控制器是
@RequestMapping(value = "/home", method = RequestMethod.GET)
public String setUp(Model model, HttpServletRequest request, @ModelAttribute employeedetail employeedetail) {
Authentication auth = SecurityContextHolder.getContext().getAuthentication();
String empNumer = auth.getName();
employeedetail employee = employeeServices.getEmployee(empNumer);
request.getSession().setAttribute("userId", employee.getEmpNumer());
return "home";
}
在这里我登录了用户编号,所以我希望得到员工的详细信息列表作为数组列表。