1. 复杂JSON字符串转模型
1 import com.fasterxml.jackson.core.type.TypeReference; 2 import com.fasterxml.jackson.databind.ObjectMapper;
1 ObjectMapper mapper = new ObjectMapper(); 2 List<CustomModel> list = mapper.readValue(json, new TypeReference<List<CustomModel>>() { });
2. 在非Bean对象调用Spring Bean管理的对象
持续更新...