Take out the attributes in the List<object> and separate them by commas


   List<String> idList = userList.stream().map(User::getId).collect(Collectors.toList());
            
   String ids = StringUtils.join(idList.toArray(), ",");
            

Guess you like

Origin blog.csdn.net/qq_39486119/article/details/121903561