List<Object>转List<User>:

List< object>转List< User>:

List objList = dao.select…(); //Query data, but what is returned is List<Object> object

Object obj = (Object)objList; //First convert objList to Object type
   //Then convert object to any type you want
    List<User> userList = (List<User>) Object;
    Insert image description here

Guess you like

Origin blog.csdn.net/zhangaob/article/details/126093202