前言
这段时间想着之前开发的项目不够完善,并且代码写的不够规范,就想着独立规范的开发一个项目,趁此整合学过的技术和丰富自己的项目经验以及规范代码。
正文
错误出现
项目跑起来之后,进行接口测试,发现响应出错

返回控制台,查看日志输出:

项目错误信息:
Resolved [org.springframework.web.HttpMediaTypeNotAcceptableException: Could not find acceptable representation]
分析并解决问题
出错原因在于响应返回的封装类缺少 getXxx() 和 setXxx() 方法