错误信息:
com.fasterxml.jackson.databind.JsonMappingException: Can not construct instance of com.boot.es.mybootes.bean.City: no suitable constructor found, can not deserialize from Object value (missing default constructor or creator, or perhaps need to add/enable type information?)
at [Source: {"cityname":"杭州","id":1}; line: 1, column: 2]
解决:
public City(){}
需要在bean类中添加无参构造函数