fastjson的json字符串转List
pom依赖
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.62</version>
</dependency>
json字符串转List:JSONObject.paresArray(str,class)
String string = redisTemplate.opsForValue().get("poetList",0,-1);
List<Poet> poetList = JSONObject.parseArray(string, Poet.class);//转换