环境: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
解决方案:
解决思路:
以前一直以为@ResponseBody会自动将返回值转换为对象,结果测试以后发现并不是这样的,还需要上面说的包,一下是我的测试
同样,返回字符串,ModelAndView一样可用。