You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "Aresxue (via GitHub)" <gi...@apache.org> on 2024/03/01 02:33:11 UTC

Re: [PR] feat: can set generic.include.class in a single call to control wheth… [dubbo]

Aresxue commented on PR #13066:
URL: https://github.com/apache/dubbo/pull/13066#issuecomment-1972349063

   > > > How can the user specify it in **one invocation**
   > > 
   > > 
   > > set attachment in RpcContext
   > > ```java
   > > RpcContext.getClientAttachment().setObjectAttachment(GENERIC_WITH_CLZ_KEY, "true");
   > > ```
   > 
   > This is a little wired. I wonder why we should support this future? Is there any scenarios?
   
   Because we don’t want to rely solely on the provider’s configuration to control whether to return the class field. Different consumers have different expectations for the class field. Our open platform will return the results to the third-party manufacturers. They want a result that does not contain class, but for In other scenarios, for example, I am doing dubbo traffic playback, then I want to get the class field when making a generalized call, because I need to restore the original untyped object to a java type object. In addition, we are based on dubbo Frameworks that implement extension point mechanisms also rely on classes to restore type information.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org