@RequestMapping("/getZtreeNodes") @ResponseBody public List<map> getZtreeNodes(String roleid){ //查询所有模块 List<module> modules = moduleService.findAll(); //查询已勾选模块 List<module> checkModules=moduleService.findByRoleId(roleid); System.out.println(checkModules); //返回数据用的 list List<map> list=new ArrayList<>(); //循环插入 list 返回数据 for (Module module : modules) { Map map=new HashMap(); map.put("id",module.getId()); map.put("pId",module.getParentId()); map.put("name",module.getName()); if(checkModules.contains(module)){ map.put("checked","true"); } list.add(map); } return list;</map></module></module></map>
}
依赖什么的都有报错是什么原因
不写 list.add(map); 页面没问题 写了就 500