/**
* 指定字符串JSON转成指定Class
* @param tClass
* @param feeJSON
* @param <T>
* @return
*/
public <T> T createFeeEntity(Class<T> tClass, String feeJSON) {
if (StringUtils.isNotBlank(feeJSON)) {
ObjectMapper mapper = new ObjectMapper();
try {
T t = mapper.readValue(feeJSON,tClass);
return t;
} catch (IOException e) {
log.info(e.getMessage(), e);
return null;
}
} else {
return null;
}
}

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-24
  • 2022-12-23
  • 2021-09-22
  • 2021-12-25
  • 2022-12-23
猜你喜欢
  • 2021-12-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案