服务器返回错误error on line 1 at column 1: Document is empty

This page contains the following errors: error on line 1 at column 1: Document is empty Below is a rendering of the page up to the first error.

这种情况是服务器处理返回了,但是返回的格式有问题,这里提示Document为空,后台是返回字符串: success

而service方法中:

@Produces(“text/xml”)

改为:

@Produces(“application/json”)

即可。

arthinking wechat
欢迎关注itzhai公众号