@RequestMapping("/deleteUser")
    @RequiresPermissions("user:delete")
    public String deleteUser(@RequestParam Long userId) {
        Assert.isTrue(userId != 1, "Cannot delete admin user");
        userService.deleteUser(userId);
        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