Loading

org.springframework.http.converter.HttpMessageNotWritableException: No converter found for return value of type

springmvc处理分页数据返回的对象时,无法直接将对象转换成json,会报org.springframework.http.converter.HttpMessageNotWritableException: No converter found for return value of type:错误

加入依赖即可:

<dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
            <version>1.2.73</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
            <version>2.11.3</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>2.11.3</version>
</dependency>
posted @ 2021-06-30 10:30  A零号  阅读(848)  评论(1编辑  收藏  举报