Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Y
yudao-cloud
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
hblj
yudao-cloud
Commits
861dcc14
提交
861dcc14
authored
5月 08, 2019
作者:
YunaiV
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
- 后端:Order 模块,引用 Dubbo 服务的版本
上级
de9f191c
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
17 行增加
和
6 行删除
+17
-6
UsersCartController.java
...der/application/controller/users/UsersCartController.java
+2
-2
CartServiceImpl.java
...va/cn/iocoder/mall/order/biz/service/CartServiceImpl.java
+4
-4
application.yaml
...r-service-impl/src/main/resources/config/application.yaml
+10
-0
DubboReferencePool.java
...cn/iocoder/mall/pay/biz/component/DubboReferencePool.java
+1
-0
没有找到文件。
order/order-application/src/main/java/cn/iocoder/mall/order/application/controller/users/UsersCartController.java
浏览文件 @
861dcc14
...
...
@@ -29,11 +29,11 @@ import static cn.iocoder.common.framework.vo.CommonResult.success;
@RequestMapping
(
"users/cart"
)
public
class
UsersCartController
{
@Reference
(
validation
=
"true"
)
@Reference
(
validation
=
"true"
,
version
=
"${dubbo.provider.CartService.version}"
)
private
CartService
cartService
;
@Reference
(
validation
=
"true"
)
private
OrderService
orderService
;
@Reference
(
validation
=
"true"
)
@Reference
(
validation
=
"true"
,
version
=
"${dubbo.consumer.CouponService.version}"
)
private
CouponService
couponService
;
@PostMapping
(
"add"
)
...
...
order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/service/CartServiceImpl.java
浏览文件 @
861dcc14
...
...
@@ -32,14 +32,14 @@ import java.util.stream.Collectors;
* 购物车服务 Service 实现类
*/
@Service
@org
.
apache
.
dubbo
.
config
.
annotation
.
Service
(
validation
=
"true"
)
@org
.
apache
.
dubbo
.
config
.
annotation
.
Service
(
validation
=
"true"
,
version
=
"${dubbo.provider.CartService.version}"
)
public
class
CartServiceImpl
implements
CartService
{
@Reference
(
validation
=
"true"
)
@Reference
(
validation
=
"true"
,
version
=
"${dubbo.consumer.PromotionActivityService.version}"
)
private
ProductSpuService
productSpuService
;
@Reference
(
validation
=
"true"
)
@Reference
(
validation
=
"true"
,
version
=
"${dubbo.consumer.PromotionActivityService.version}"
)
private
PromotionActivityService
promotionActivityService
;
@Reference
(
validation
=
"true"
)
@Reference
(
validation
=
"true"
,
version
=
"${dubbo.consumer.CouponService.version}"
)
private
CouponService
couponService
;
@Autowired
...
...
order/order-service-impl/src/main/resources/config/application.yaml
浏览文件 @
861dcc14
...
...
@@ -23,6 +23,16 @@ dubbo:
name
:
dubbo
scan
:
base-packages
:
cn.iocoder.mall.order.biz.service
provider
:
CartService
:
version
:
1.0.0
consumer
:
ProductSpuService
:
version
:
1.0.0
PromotionActivityService
:
version
:
1.0.0
CouponService
:
version
:
1.0.0
# logging
logging
:
...
...
pay/pay-service-impl/src/main/java/cn/iocoder/mall/pay/biz/component/DubboReferencePool.java
浏览文件 @
861dcc14
...
...
@@ -58,6 +58,7 @@ public class DubboReferencePool {
reference
.
setInterface
(
notifyUrlParts
[
0
]);
// 弱类型接口名
reference
.
setGeneric
(
true
);
// 声明为泛化接口
reference
.
setApplication
(
application
);
reference
.
setVersion
(
"1.0.0"
);
// TODO 芋艿,后面要优化下。
// 获得 GenericService 对象
GenericService
genericService
=
reference
.
get
();
// 构建最终的 ReferenceMeta 对象
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论