no suitable HttpMessageConverter found for response type and content type


這個問題困擾了自己一天了,網上搜索資料也搜索了一大堆,還是沒能解決。就是說有多種情況會出現這個異常,網上沒找到和我情況一樣的

直到下班后,我再解決的時候,發現了問題。有個屬性

    //還差多少天可以生成報告
    private Integer needReportDays;

    public Integer getNeedReportDays() {
        return needReportDays;
    }
    public void setNeedReportDays(int needReportDays) {
        this.needReportDays = needReportDays;
    }

改為

    public Integer getNeedReportDays() {
        return needReportDays;
    }
    public void setNeedReportDays(Integer needReportDays) {
        this.needReportDays = needReportDays;
    }

就OK了    

就是屬性類型int更改Integer 后 get set 方法沒更新 導致了。。

很基礎的東西,導致解決問題花費大量的精力,哎 真是千里之堤潰於蟻穴。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM