当前位置: 代码迷 >> 综合 >> java.lang.NoSuchMethodException: java.util.List.init()
  详细解决方案

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

热度:12   发布时间:2023-11-20 07:24:05.0

在这里插入图片描述在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);}
  相关解决方案