SpringMVC --- No converter found for return value of type: class ink.xlr.po.User

版权声明:龙人版 https://blog.csdn.net/qq_39021393/article/details/90443213

完整错误:
Request processing failed; nested exception is java.lang.IllegalArgumentException: No converter found for return value of type: class ink.xlr.po.User


返回的对象User无法转换


解决办法:

在pom.xml中添加jackson(自动转换Java对象为json对象和xml文档)


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

猜你喜欢

转载自blog.csdn.net/qq_39021393/article/details/90443213