环境:springmvc4.2.6 idea maven
问题:HTTP Status 500 - Request processing failed; nested exception is java.lang.IllegalArgumentException: No converter found for return value of type: class com.util.BaseResponse

springmvc返回json数据

解决方案:

springmvc返回json数据

解决思路:
以前一直以为@ResponseBody会自动将返回值转换为对象,结果测试以后发现并不是这样的,还需要上面说的包,一下是我的测试
springmvc返回json数据

同样,返回字符串,ModelAndView一样可用。

相关文章:

  • 2021-06-22
  • 2022-02-09
  • 2022-02-09
  • 2022-02-15
  • 2021-12-31
  • 2021-07-06
  • 2022-03-07
猜你喜欢
  • 2021-05-04
  • 2021-09-10
  • 2021-09-12
  • 2021-10-14
  • 2021-10-23
  • 2022-02-09
  • 2022-02-09
相关资源
相似解决方案