示例#1
0
  @RequestMapping(
      value = "/navigate",
      method = {RequestMethod.GET, RequestMethod.POST})
  @ResponseBody
  public Object navigate(ModelMap model) {

    List<TreeNode> tree = menuManager.tree();

    return tree;
  }
示例#2
0
  @RequestMapping(
      value = "/navigate/auth",
      method = {RequestMethod.GET, RequestMethod.POST})
  @ResponseBody
  public Object navigateWithAuth(ModelMap model) {
    Long user_id = authManager.getUser().getUserId();
    User user = userManager.getUserById(user_id);
    List<TreeNode> tree = menuManager.tree(authManager.getAuthorities(), user.getPermissions());

    return tree;
  }