no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) 怎么解決
[2019-09-30?21:35:41.796]?boot?-??INFO?[http-nio-8094-exec-1]?---?ItemController:?接受到請求數(shù)據(jù):com.debug.liang.dubbo.two.server.request.RecordPushRequest@98929b2
[2019-09-30?21:35:41.836]?boot?-?ERROR?[http-nio-8094-exec-1]?---?ItemController:?面向客戶:用戶下單-異常:
com.fasterxml.jackson.databind.JsonMappingException:?No?serializer?found?for?class?com.debug.liang.dubbo.two.server.request.RecordPushRequest?and?no?properties?discovered?to?create?BeanSerializer?(to?avoid?exception,?disable?SerializationFeature.FAIL_ON_EMPTY_BEANS)?)
at?com.debug.liang.dubbo.two.server.controller.OrderRecordController.pushRecord(OrderRecordController.java:45)
at?sun.reflect.NativeMethodAccessorImpl.invoke0(Native?Method)
at?sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at?sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at?java.lang.reflect.Method.invoke(Method.java:498)
at?org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
at?org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136)
at?org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110)
at?org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:817)
at?org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:731)
at?org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
at?org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
at?org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
at?org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:968)
at?org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:870)
自己自查了半天,應該是查詢的第一個服務類上出了問題。但是苦于不知道怎么修改。麻煩各位前輩看看,拜托了。
2020-03-14
試一下用@Resource
2019-10-02
同構get set類型下,少了一個@Bean?