问题 java.lang.IllegalArgumentException:No converter found for return value of type解决方法
返回对象出错,首先看自己的是否开启了注解扫描,在springmvc.xml配置文件中启动注解驱动!也就是没有开启<mvc:annotation-driven />,加入即可。
如果在项目中使用了Maven,则需要加入以下两个依赖,否则会报错
<dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> <version>4.3.14.RELEASE</version> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-core</artifactId> <version>2.6.7</version> </dependency>