1. 程式人生 > >解決java.lang.IllegalArgumentException: No converter found for return value of type

解決java.lang.IllegalArgumentException: No converter found for return value of type

converter 分享 添加 bind ack nbsp version tab tex

1原因:這是因為springmvc默認是沒有對象轉換成json的轉換器的,需要添加jackson依賴。

簡而言之 需要將對象轉化為json對象 Jackson 是一種實現方式

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.8.3</version>
</dependency>

這個包 會自動 添加其他兩個依賴包的

一共三個

技術分享圖片

解決java.lang.IllegalArgumentException: No converter found for return value of type