之前在spring 3中用的好好的MappingJacksonHttpMessageConverter转换器,将对象转为json响应给浏览器,在spring4中,报错. Cannot create inner bean 'org.springframework.http.converter.json.MappingJackson2HttpMessageConverter#0' of type [org.springframework.http.converter.json.MappingJack…
最近在做查询的数据遇到如下报错: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer and no properties discovered to create BeanSerializer (to avoid exception, disab…
本打算今天早点下班,结果下午测试调试程序发现一个问题纠结到晚上才解决,现在写一篇博客来总结下. 是这样的,本人在Spring mvc控制层用到了@ResponseBody标注,以便返回的数据为json格式的数据,到前端JS中用. 问题来了,当我用火狐调试发现请求总是报:406 Not Acceptable,message:description The resource identified by this request is only capable of generating respon…
本打算今天早点下班,结果下午测试调试程序发现一个问题纠结到晚上才解决,现在写一篇博客来总结下. 是这样的,本人在Spring mvc控制层用到了@ResponseBody标注,以便返回的数据为json格式的数据,到前端JS中用. 问题来了,当我用火狐调试发现请求总是报:406 Not Acceptable,message:description The resource identified by this request is only capable of generating respon…
spring mvc通过@RequestMapping("/register")和@ResponseBody返回json格式的字符串时出现如下异常: The resource identified by this request is only capable of generating responses with characteristics not acceptable according to the request "accept" headers. 控…