章节9-3SpringMVC全局异常实战视频的讲解有问题
来源:9-3 SpringMVC全局异常实战

loubobooo
2017-12-13
老师在这个章节提到了MappingJacksonJsonView2其实是在springmvc4.0.3release的jar包中,跟你提到的这个jar包
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.9.12</version>
</dependency>
并不是在这个jar包中的,还有两者应该没有关联的吧!
1回答
-
你好,同学,非常好的问题
/**
* Spring MVC {@link View} that renders JSON content by serializing the model for the current request
* using <a href="http://jackson.codehaus.org/">Jackson 2's</a> {@link ObjectMapper}.
*
* <p>By default, the entire contents of the model map (with the exception of framework-specific classes)
* will be encoded as JSON. If the model contains only one key, you can have it extracted encoded as JSON
* alone via {@link #setExtractValueFromSingleKeyModel}.
*
* @author Jeremy Grelle
* @author Arjen Poutsma
* @author Rossen Stoyanchev
* @author Juergen Hoeller
* @since 3.1.2
*/
public class MappingJackson2JsonView extends AbstractView {using <a href="http://jackson.codehaus.org/">Jackson 2's</a> {@link ObjectMapper}.
这个是MappingJackson2JsonView的类注释,亲爱的同学。可以看看~
其实很多spring的依赖,有时候要自己加,并不会自动下载,咱们那个就是自己加的。
包括后续redisson有一个jackson的fasterxml也是要自己加一下依赖。
赞同学!善于思考,我认得你的头像~~感谢你一直来的支持!一起加油~~
112017-12-13
相似问题