apache / apache/dubbo

关于dubbo协议转rest协议的一些疑问

Open
#10,421 0 comments 0 reactions 0 assignees View on GitHub
type/discussion
Dominant language
Java
Stars
41.6k
Forks
26.4k
Avg merge
15h 13m
Merged PRs (30d)
4

Description

各位专家们好:
最近项目组需要把一些存量的dubbo接口同时发布rest接口,遇到了以下2个问题:
1.对于单参数的接口,可以通过@Path等注解同时发布rest协议,但是对于多参数接口,例如 Test test(Test test1, Test test2); 这样的接口,在不修改入参类型的前提下,暂时没找到方法进行反序列化(除非新建一个类,把test1、test2包装一下,但这种做法修改了入参类型);
2.dubbo协议接口的参数可以定义为父类,消费者调用时,可以传入具体的子类,生产者可以反序列化成具体的子类,但是rest协议无法支持这种接口。
对于以上2个问题,好像可以通过实现resteasy的反序列化spi的方式进行解决。请问在dubbo框架中,有相关的解决方法吗?或者专家们有什么更好地建议吗?

Contributor guide

Open the contributing guide

Research direction

No source files, tests, or entry points are named. Start by locating Dubbo’s REST protocol parameter deserialization and reviewing how the RESTEasy deserialization SPI relates to multi-parameter and polymorphic inputs; done would be a confirmed supported approach or a clearly scoped framework change.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.