You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2022/09/26 09:27:35 UTC

[GitHub] [dubbo] mobile664042 opened a new issue, #10675: 为啥dubbo:reference不支持path属性

mobile664042 opened a new issue, #10675:
URL: https://github.com/apache/dubbo/issues/10675

   <!-- If you need to report a security issue please visit https://github.com/apache/dubbo/security/policy -->
   
   - [ ] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate.
   
   ## Ask your question here
   
   生产者 [dubbo:service](https://dubbo.apache.org/zh/docsv2.7/user/references/xml/dubbo-service/) 支持path属性,而消费者 [dubbo:reference](https://dubbo.apache.org/zh/docsv2.7/user/references/xml/dubbo-reference/)不支持path属性,消费者只有类似的url,如果生产者使用了path属性, 在动态查询生产者会非常不方便。示例代码如下:
   ![image](https://user-images.githubusercontent.com/1433479/192241687-ef13fcca-60fc-4a2c-9f0e-7beecfd36ec0.png)
   
   还有一个问题为啥新版本3.xxx版本的文档,没有《XML 配置》,完全一样吗?
   测试版本:2.7.3
   


-- 
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.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


[GitHub] [dubbo] nobodyw-cell commented on issue #10675: 为啥dubbo:reference不支持path属性

Posted by GitBox <gi...@apache.org>.
nobodyw-cell commented on issue #10675:
URL: https://github.com/apache/dubbo/issues/10675#issuecomment-1307032496

   I want to try, please assign to me


-- 
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


[GitHub] [dubbo] akaakking commented on issue #10675: 为啥dubbo:reference不支持path属性

Posted by GitBox <gi...@apache.org>.
akaakking commented on issue #10675:
URL: https://github.com/apache/dubbo/issues/10675#issuecomment-1335187396

   reference.setUrl的设计主要是为了直连provider,如果是直连provider的话,那么url(protocol://ip:port/path)可以看作一个服务连接的最小单元,从设计上来讲path不应该被拆分出来。


-- 
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


[GitHub] [dubbo] akaakking commented on issue #10675: 为啥dubbo:reference不支持path属性

Posted by GitBox <gi...@apache.org>.
akaakking commented on issue #10675:
URL: https://github.com/apache/dubbo/issues/10675#issuecomment-1336123492

   > > reference.setUrl的设计主要是为了直连provider,如果是直连provider的话,那么url(protocol://ip:port/path)可以看作一个服务连接的最小单元,从设计上来讲path不应该被拆分出来。
   > 
   > 这个东西是可以扩展的,用来做数据隔离区分的还是非常有用的,比如这个场景:一个dubbo接口被不同的应用实现了,这时要回调某个项目的这个dubbo接口,用path会非常方便(groupId,version,tag都有特定的含义不方便用在这个地方)。
   
   好的,我明白你的意思了。


-- 
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


[GitHub] [dubbo] MieAh commented on issue #10675: 为啥dubbo:reference不支持path属性

Posted by "MieAh (via GitHub)" <gi...@apache.org>.
MieAh commented on issue #10675:
URL: https://github.com/apache/dubbo/issues/10675#issuecomment-1507369613

   plz assgin to me.
   


-- 
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


[GitHub] [dubbo] mobile664042 commented on issue #10675: 为啥dubbo:reference不支持path属性

Posted by GitBox <gi...@apache.org>.
mobile664042 commented on issue #10675:
URL: https://github.com/apache/dubbo/issues/10675#issuecomment-1336112205

   > reference.setUrl的设计主要是为了直连provider,如果是直连provider的话,那么url(protocol://ip:port/path)可以看作一个服务连接的最小单元,从设计上来讲path不应该被拆分出来。
   
   这个东西是可以扩展的,用来做数据隔离区分的还是非常有用的,比如这个场景:一个dubbo接口被不同的应用实现了,这时要回调某个项目的这个dubbo接口,用path会非常方便(groupId,version,tag都有特定的含义不方便用在这个地方)。


-- 
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


[GitHub] [dubbo] akaakking commented on issue #10675: 为啥dubbo:reference不支持path属性

Posted by GitBox <gi...@apache.org>.
akaakking commented on issue #10675:
URL: https://github.com/apache/dubbo/issues/10675#issuecomment-1335194977

   而service.setpath(),正如 @AlbumenJ 所说是方便发布rest服务的通用接口的


-- 
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


[GitHub] [dubbo] AlbumenJ commented on issue #10675: 为啥dubbo:reference不支持path属性

Posted by GitBox <gi...@apache.org>.
AlbumenJ commented on issue #10675:
URL: https://github.com/apache/dubbo/issues/10675#issuecomment-1257772428

   xml 配置的数据源和 config 是一样的,最终都会落到 config 上
   
   path 的本身设计是给 rest 协议使用的,用于发布通用接口的。 Reference 里面没有的这个 case 你可以提个 PR 看能不能修复下


-- 
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


[GitHub] [dubbo] akaakking commented on issue #10675: 为啥dubbo:reference不支持path属性

Posted by GitBox <gi...@apache.org>.
akaakking commented on issue #10675:
URL: https://github.com/apache/dubbo/issues/10675#issuecomment-1335182993

   > 
   
   为什么要在reference中设置path,是怕因为服务端设置了path,所以consumer这边掉不到服务吗?
   consumer这边如果走注册中心去连接provider的话,不用单独设置url或者什么path都可以调到服务,不受影响的。
   


-- 
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