{"action":"created","issue":{"url":"https://api.github.com/repos/alibaba/fastjson/issues/577","repository_url":"https://api.github.com/repos/alibaba/fastjson","labels_url":"https://api.github.com/repos/alibaba/fastjson/issues/577/labels{/name}","comments_url":"https://api.github.com/repos/alibaba/fastjson/issues/577/comments","events_url":"https://api.github.com/repos/alibaba/fastjson/issues/577/events","html_url":"https://github.com/alibaba/fastjson/issues/577","id":150690152,"number":577,"title":"在springmvc-4.2.5使用fastjson-1.2.10 出现关于MediaType异常","user":{"login":"dounine","id":7344514,"avatar_url":"https://avatars.githubusercontent.com/u/7344514?v=3","gravatar_id":"","url":"https://api.github.com/users/dounine","html_url":"https://github.com/dounine","followers_url":"https://api.github.com/users/dounine/followers","following_url":"https://api.github.com/users/dounine/following{/other_user}","gists_url":"https://api.github.com/users/dounine/gists{/gist_id}","starred_url":"https://api.github.com/users/dounine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dounine/subscriptions","organizations_url":"https://api.github.com/users/dounine/orgs","repos_url":"https://api.github.com/users/dounine/repos","events_url":"https://api.github.com/users/dounine/events{/privacy}","received_events_url":"https://api.github.com/users/dounine/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-24T18:50:07Z","updated_at":"2016-04-25T01:30:09Z","closed_at":null,"body":"> 使用springmvc-4.2.5与servlet-3.1&fastjson-1.2.10\r\n> java注解code如下\r\n\r\n```\r\npublic class MvcConfig extends WebMvcConfigurerAdapter {\r\n\r\n    @Override\r\n    public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {\r\n        // alibaba fastJson java config\r\n        FastJsonHttpMessageConverter fastJsonHttpMessageConverter = new FastJsonHttpMessageConverter();\r\n        List<MediaType> mediaTypes = new ArrayList<>(1);\r\n        mediaTypes.add(MediaType.APPLICATION_JSON_UTF8);\r\n        fastJsonHttpMessageConverter.setSupportedMediaTypes(mediaTypes);\r\n        fastJsonHttpMessageConverter.setFeatures(SerializerFeature.DisableCircularReferenceDetect);\r\n\r\n        converters.add(fastJsonHttpMessageConverter);\r\n```\r\n\r\n> 异常信息如下:\r\n\r\n```\r\njava.lang.AbstractMethodError: com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter.canWrite(Ljava/lang/reflect/Type;Ljava/lang/Class;Lorg/springframework/http/MediaType;)Z\r\n\tat org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.getProducibleMediaTypes(AbstractMessageConverterMethodProcessor.java:308)\r\n\tat org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConverters(AbstractMessageConverterMethodProcessor.java:175)\r\n\tat org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConverters(AbstractMessageConverterMethodProcessor.java:153)\r\n\tat org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor.handleReturnValue(RequestResponseBodyMethodProcessor.java:165)\r\n\tat org.springframework.web.method.support.HandlerMethodReturnValueHandlerComposite.handleReturnValue(HandlerMethodReturnValueHandlerComposite.java:80)\r\n\tat org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:126)\r\n\tat org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:817)\r\n\tat org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:731)\r\n\tat org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)\r\n\tat org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)\r\n\tat org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)\r\n\tat org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:968)\r\n\tat org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:870)\r\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:650)\r\n\tat org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:844)\r\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:731)\r\n```"},"comment":{"url":"https://api.github.com/repos/alibaba/fastjson/issues/comments/214086146","html_url":"https://github.com/alibaba/fastjson/issues/577#issuecomment-214086146","issue_url":"https://api.github.com/repos/alibaba/fastjson/issues/577","id":214086146,"user":{"login":"VictorZeng","id":9109915,"avatar_url":"https://avatars.githubusercontent.com/u/9109915?v=3","gravatar_id":"","url":"https://api.github.com/users/VictorZeng","html_url":"https://github.com/VictorZeng","followers_url":"https://api.github.com/users/VictorZeng/followers","following_url":"https://api.github.com/users/VictorZeng/following{/other_user}","gists_url":"https://api.github.com/users/VictorZeng/gists{/gist_id}","starred_url":"https://api.github.com/users/VictorZeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VictorZeng/subscriptions","organizations_url":"https://api.github.com/users/VictorZeng/orgs","repos_url":"https://api.github.com/users/VictorZeng/repos","events_url":"https://api.github.com/users/VictorZeng/events{/privacy}","received_events_url":"https://api.github.com/users/VictorZeng/received_events","type":"User","site_admin":false},"created_at":"2016-04-25T01:30:09Z","updated_at":"2016-04-25T01:30:09Z","body":"fixed in #579 "}}