怎么解决!!!!

来源:3-5 Hello Spring MVC

qq_Messenger_0

2017-09-30 17:15

纯净版 tomcat运行出现java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener,换了个tomcat 运行出现java.lang.ClassNotFoundException: org.springframework.web.servlet.view.json.org.springframework.web.servlet.view.json.MappingJackson2JsonView,注释掉配置文件的MappingJackson2JsonView部分就可以了,为什么

写回答 关注

4回答

  • 浪浪花一朵朵
    2017-09-30 22:46:27
    已采纳

    看看jackson的依赖引入了嘛

  • qq_Messenger_0
    2017-10-09 16:56:33

    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.view.ContentNegotiatingViewResolver#0' defined in ServletContext resource [/WEB-INF/configs/spring/mvc-dispatcher-servlet.xml]: Cannot create inner bean 'org.springframework.web.servlet.view.json.MappingJackson2JsonView#25ca1a0c' of type [org.springframework.web.servlet.view.json.MappingJackson2JsonView] while setting bean property 'defaultViews' with key [0]; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.web.servlet.view.json.MappingJackson2JsonView] for bean with name 'org.springframework.web.servlet.view.json.MappingJackson2JsonView#25ca1a0c' defined in ServletContext resource [/WEB-INF/configs/spring/mvc-dispatcher-servlet.xml]; nested exception is java.lang.ClassNotFoundException: org.springframework.web.servlet.view.json.MappingJackson2JsonView

  • qq_Messenger_0
    2017-10-09 16:30:48

    org.springframework.web.servlet.view.json.org.springframework.web.servlet.view.json.MappingJackson2JsonView  jar包确实没有这个,是要导入什么包

  • qq_Messenger_0
    2017-10-09 16:11:39

    http://img3.mukewang.com/59db2f190001ee2d02980119.jpg有引入的

Spring MVC起步

Java中Spring MVC框架入门教程,快来看最易用的MVC框架

195972 学习 · 572 问题

查看课程

相似问题