環境: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一樣可用。