非常感谢: 谭卓博客
springmvc4 json
springmvc4 集成hibernate4 出现
NoClassDefFoundError:com/fasterxml/jackson/core/JsonProcessingException
springmvc4 JSON 的配置发生了变化:
1 <bean 2 class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"> 3 <property name="messageConverters"> 4 <list> 5 <ref bean="mappingJackson2HttpMessageConverter" /> 6 </list> 7 </property> 8 </bean> 9 <bean id="mappingJackson2HttpMessageConverter" 10 class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter"> 11 <property name="supportedMediaTypes"> 12 <list> 13 <value>text/html;charset=UTF-8</value> 14 <value>text/json;charset=UTF-8</value> 15 <value>application/json;charset=UTF-8</value> 16 </list> 17 </property> 18 </bean>
用到的json包分别为:
jackson-annotations-2.5.0.jar
jackson-core-2.5.0.jar
jackson-databind-2.5.0.jar
下载地址:
链接: http://pan.baidu.com/s/1mg5RCgS 密码: fjs9
转载请注明:谭卓博客 » Springmvc4 com/fasterxml/jackson/core/JsonProcessingException