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

[GitHub] [dubbo] liunancun opened a new issue, #11860: 想问下大家关于跨系统之间类名相同的情况是怎么处理的,A系统调用B系统提供的Order服务,两个系统都存在Order对象,名字相同

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

   我们做了个系统专门用来同步Amazon平台的数据,暂时称之为B系统,同时我们内部有个ERP系统,暂时称之为B系统
   
   我们对接了Amazon的众多接口,比如Order接口、Product接口等等,在B系统我们有AmazonOrderService和AmazonProductService,有AmazonOrder对象和AmazonProduct对象。
   
   同时我们在A系统有表来保存Amazon的Order和Product,所以在A系统也存在AmazonOrderService、AmazonProductService、AmazonOrder和AmazonProduct这些类,这些类的名字都是一样的,只是包名不一样
   
   因为Dubbo是通过引用接口包来对接的,A系统引用了B系统的接口包,也就把B系统的AmazonOrderService、AmazonProductService、AmazonOrder和AmazonProduct引入到A系统了,这个时候就存在同名的类,如果都通过全路径包名区分的话,感觉代码不是很优雅,大家都是怎么处理这类问题的,有没有什么好办法可以借鉴一下


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


Re: [I] 想问下大家关于跨系统之间类名相同的情况是怎么处理的,A系统调用B系统提供的Order服务,两个系统都存在Order对象,名字相同 [dubbo]

Posted by "wxbty (via GitHub)" <gi...@apache.org>.
wxbty closed issue #11860: 想问下大家关于跨系统之间类名相同的情况是怎么处理的,A系统调用B系统提供的Order服务,两个系统都存在Order对象,名字相同
URL: https://github.com/apache/dubbo/issues/11860


-- 
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] liunancun commented on issue #11860: 想问下大家关于跨系统之间类名相同的情况是怎么处理的,A系统调用B系统提供的Order服务,两个系统都存在Order对象,名字相同

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

   我现在B系统的类统一加Platform后缀,AmazonOrderPlatform、AmazonProductPlatform、AmazonOrderPlatformService、AmazonProductPlatformService这样,感觉比较累赘


-- 
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 #11860: 想问下大家关于跨系统之间类名相同的情况是怎么处理的,A系统调用B系统提供的Order服务,两个系统都存在Order对象,名字相同

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

   命名上可以再具象一些(比如带上存储 or 数据库这种名字),这样就不会重名了


-- 
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 #11860: 想问下大家关于跨系统之间类名相同的情况是怎么处理的,A系统调用B系统提供的Order服务,两个系统都存在Order对象,名字相同

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

   > 我现在B系统的类统一加Platform后缀,AmazonOrderPlatform、AmazonProductPlatform、AmazonOrderPlatformService、AmazonProductPlatformService这样,感觉比较累赘
   
   这个本身是 Java 包管理的问题,在 import 之后包名的区别在编码时是很少感知的。这直接导致了只能从类名上下手区分


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