SpringBoot报406错误,There was an unexpected error (type=Not Acceptable, status=406)

问题:

 

 

 

直接解决方法:

对应接口返回的实体类,加上get方法

即使get方法没有被显示调用(可能是SpringBoot内部需要调用get方法获取对应参数)

 

例子:

如图,返回的Result类内部,需要加上这几个get方法,再次启动服务就没问题了

 

posted @ 2022-06-15 14:47  r1-12king  阅读(400)  评论(0编辑  收藏  举报