Spring mvc 每当我添加ContentNegotingViewResolver bean时,我的所有其他jsp页面都停止工作
每当我添加ContentNegotiatingViewResolver bean时,我的所有其他jsp页面都停止工作,我会得到以下错误-Servlet fitTrackerServlet抛出异常的HTTP状态500-Servlet.init() org.springframework.beans.factory.BeanCreationException:创建名为“org.springframework.web.servlet.view.ContentNegotiatingViewSolver#0”的bean时出错,该名称在ServletContext资源[/web-INF/config/servlet config.xml]中定义:初始化bean失败;嵌套的异常是java.lang.NoClassDefFoundError:com/fasterxml/jackson/core/JsonGenerator 这是我的servlet-config.xmlSpring mvc 每当我添加ContentNegotingViewResolver bean时,我的所有其他jsp页面都停止工作,spring-mvc,Spring Mvc,每当我添加ContentNegotiatingViewResolver bean时,我的所有其他jsp页面都停止工作,我会得到以下错误-Servlet fitTrackerServlet抛出异常的HTTP状态500-Servlet.init() org.springframework.beans.factory.BeanCreationException:创建名为“org.springframework.web.servlet.view.ContentNegotiatingViewSolver#
<bean class="org.springframework.web.servlet.view.BeanNameViewResolver" p:order="0"/>
<bean class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver">
<property name="order" value="1"/>
<property name="contentNegotiationManager">
<bean class="org.springframework.web.accept.ContentNegotiationManager">
<constructor-arg>
<bean class="org.springframework.web.accept.PathExtensionContentNegotiationStrategy">
<constructor-arg>
<map>
<entry key="json" value="application/json"/>
<entry key="xml" value="application/xml"/>
</map>
</constructor-arg>
</bean>
</constructor-arg>
</bean>
</property>
<property name="defaultViews">
<list>
<bean class="org.springframework.web.servlet.view.json.MappingJackson2JsonView"/>
<bean class="org.springframework.web.servlet.view.xml.MarshallingView">
<constructor-arg>
<bean class="org.springframework.oxm.xstream.XStreamMarshaller">
<property name="autodetectAnnotations" value="true"/>
</bean>
</constructor-arg>
</bean>
</list>
</property>
</bean>