Now I am using ObjectMapper to convert a Map to POJO in java, this is my code:
@Override
public RssSubSourceExtDTO getChannelAnalysisInfo() {
Map<String, Object> analysisInfo = customRssSubSourceMapper.getSourceInfo(new SubSourceRequest());
final ObjectMapper mapper = new ObjectMapper();
final RssSubSourceExtDTO pojo = mapper.convertValue(analysisInfo, RssSubSourceExtDTO.class);
return pojo;
}
but the result POJO all properties are null. I have tried to tweak the POJO properties name, and tweak the POJO properties as Object type, but still could not convert value from map to POJO. This is my POJO define:
import java.io.Serializable;
/**
* @author dolphin
*/
@JsonIgnoreProperties(ignoreUnknown = true)
@Data
public class RssSubSourceExtDTO implements Serializable {
/**
* support increment pull channel count
* rss_sub_source.id
*
* @mbggenerated
*/
private Object incrementPullChannelCount;
/**
* do not support increment pull channel count
* rss_sub_source.created_time
*
* @mbggenerated
*/
private Long fullPullChannelCount;
/**
*
* rss_sub_source.editor_pick
*
* @mbggenerated
*/
@ApiModelProperty(value = ")")
private Long editorPickChannelCount;
}
and this is the debug view now:
what should I do to fix it?