String data;
ObjectMapper objectMapper = new ObjectMapper();
objectMapper.setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE);
try {
// 对象转字符串
data = objectMapper.writeValueAsString(template);
}catch (Exception e){
return false;
}
上一篇
lua
2020-12-13
下一篇
发送get和post请求
2020-12-12