java.lang.NoSuchMethodException: java.util.List.()

在這裏插入圖片描述在controller裏面的參數裏面添加@RequestParam(value = “ids”, required = true)

    @GetMapping("selectByNameAndId")
    ResultDTO selectUserListByNameAndId(@RequestParam(value = "ids", required = true) List<Integer> ids, String username) {
        String logInfo = "-通過名和Id查詢用戶列表";
        if (CollectionUtils.isEmpty(ids) || username == null) {
            return ResultDTO.fail("參數爲空");
        }
        return userService.selectUserListByNameAndId(logInfo, ids, username);
    }

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章