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

    xiaoxiao2022-07-03  104


    完整错误: 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>
    最新回复(0)