spring boot 单体项目运行返回正常json 类型;

添加 eureka 服务注册后 返回值类型 变为xml 类型;

后查询到博客 :https://blog.csdn.net/zyb2017/article/details/80265070
最后解决方案为:
每个@RestController 类的头部添加:
produces= "application/json;charset=UTF-8"

spring boot 单体项目运行返回正常json 类型;
添加 eureka 服务注册后 返回值类型 变为xml 类型;
后查询到博客 :https://blog.csdn.net/zyb2017/article/details/80265070
最后解决方案为:
每个@RestController 类的头部添加:
produces= "application/json;charset=UTF-8"
本文标题:spring boot + eureka 默认返回 xml
本文链接:https://www.haomeiwen.com/subject/ibsrvftx.html
网友评论