在spring4.x中使用了org.springframework.http.converter.json.MappingJackson2HttpMessageConverter代替舊的MappingJacksonHttpMessageConverter。web
並將maven依賴改爲以下:spring
<dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-core</artifactId> <version>2.5.1</version> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> <version>2.5.1</version> </dependency>
咱們用7-zip去查看spring-web-[version].jar,確實已找不到MappingJacksonHttpMessageConverter這個class了。json