@RequestMapping(value = "/editUser", method = RequestMethod.POST)
    @RequiresPermissions("user:edit")
    public String editUser(Model model, @RequestParam Long userId,
                           @ModelAttribute EditUserCommand command, BindingResult errors) {
        editUserValidator.validate(command, errors);

        if (errors.hasErrors()) {
            return "editUser";
        }

        User user = userService.getUser(userId);
        command.updateUser(user);

        userService.updateUser(user);

        return "redirect:/s/manageUsers";
    }
Web MVC controller that handles operations related to managing users, such as editing them and deleting them.
samples/spring-hibernate/src/main/java/org/apache/shiro/samples/sprhib/web/ManageUsersController.java