@RequestMapping("admin-batch-list") public String input(@RequestParam(value = "text", required = false) String text, Model model) { if (text != null) { List<UserDTO> userDtos = new ArrayList<UserDTO>(); for (String str : text.split("\n")) { str = str.trim(); if (str.length() == 0) { continue; } UserDTO userDto = userConnector.findByUsername(str, ScopeHolder.getUserRepoRef()); if (userDto.getStatus() != 1) { continue; } userDtos.add(userDto); } model.addAttribute("userDtos", userDtos); } return "party/admin-batch-input"; }