String data;
ObjectMapper objectMapper = new ObjectMapper();
objectMapper.setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE);
try {
// 对象转字符串
data = objectMapper.writeValueAsString(template);
}catch (Exception e){
return false;
}
上一篇

2020-12-13
下一篇

2020-12-12