Java笔记(2020)

1. 复杂JSON字符串转模型

1 import com.fasterxml.jackson.core.type.TypeReference;
2 import com.fasterxml.jackson.databind.ObjectMapper;
1 ObjectMapper mapper = new ObjectMapper();
2 List list =  mapper.readValue(json, new TypeReference>() { });

2. 在非Bean对象调用Spring Bean管理的对象

 

 

持续更新...

你可能感兴趣的:(Java笔记(2020))