服务端返回的数据 在页面上通过xml显示

This XML file does not appear to have any style information associated with it. The document tree is_json

 转为json显示

//注意producess 的 包
import org.springframework.http.MediaType;
@RequestMapping(value = "/find",produces = MediaType.APPLICATION_JSON_UTF8_VALUE)

在RequestMapping注解后 加一个 produces属性即可

注:该属性在 org.springframework.http 包下