使用CrudService里的list方法并对返回数据里面的map进行解析

PageInfo> columnSecondCatalogPage = this.bookService.list(parameterMap);
List> series = columnSecondCatalogPage.getList();
int size = series.size();
    for(int i=0;i stringObjectMap = series.get(i);
        ObjectMapper objectMapper = new ObjectMapper();
        Book book = objectMapper.convertValue(stringObjectMap, Book.class);
        //通过拿到的实体对里面的字段进行处理
    }


导入的是:
import com.fasterxml.jackson.databind.ObjectMapper;
这个架包

 

你可能感兴趣的:(springboot)