Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Y
yudao-cloud
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
hblj
yudao-cloud
Commits
c550340c
提交
c550340c
authored
5月 08, 2019
作者:
YunaiV
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
- 后端:解决 Order 和 Search 的 Dubbo 服务引用问题。
上级
3c2fbc15
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
30 行增加
和
19 行删除
+30
-19
OrderController.java
...l/order/application/controller/users/OrderController.java
+2
-2
OrderLogisticsController.java
...pplication/controller/users/OrderLogisticsController.java
+1
-1
OrderReturnController.java
...r/application/controller/users/OrderReturnController.java
+1
-1
OrderReturnServiceImpl.java
...ocoder/mall/order/biz/service/OrderReturnServiceImpl.java
+1
-1
OrderServiceImpl.java
...a/cn/iocoder/mall/order/biz/service/OrderServiceImpl.java
+4
-4
application.yaml
...r-service-impl/src/main/resources/config/application.yaml
+8
-0
DubboReferencePool.java
...cn/iocoder/mall/pay/biz/component/DubboReferencePool.java
+1
-1
pom.xml
search/search-application/pom.xml
+0
-9
pom.xml
search/search-service-impl/pom.xml
+12
-0
没有找到文件。
order/order-application/src/main/java/cn/iocoder/mall/order/application/controller/users/OrderController.java
浏览文件 @
c550340c
...
...
@@ -42,9 +42,9 @@ public class OrderController {
@Reference
(
validation
=
"true"
)
private
OrderService
orderService
;
@Reference
(
validation
=
"true"
)
@Reference
(
validation
=
"true"
,
version
=
"${dubbo.provider.CartService.version}"
)
private
CartService
cartService
;
@Reference
(
validation
=
"true"
)
@Reference
(
validation
=
"true"
,
version
=
"${dubbo.consumer.DataDictService.version}"
)
private
DataDictService
dataDictService
;
@GetMapping
(
"order_page"
)
...
...
order/order-application/src/main/java/cn/iocoder/mall/order/application/controller/users/OrderLogisticsController.java
浏览文件 @
c550340c
...
...
@@ -37,7 +37,7 @@ public class OrderLogisticsController {
@Reference
(
validation
=
"true"
)
private
OrderLogisticsService
orderLogisticsService
;
@Reference
(
validation
=
"true"
)
@Reference
(
validation
=
"true"
,
version
=
"${dubbo.consumer.DataDictService.version}"
)
private
DataDictService
dataDictService
;
@GetMapping
(
"info"
)
...
...
order/order-application/src/main/java/cn/iocoder/mall/order/application/controller/users/OrderReturnController.java
浏览文件 @
c550340c
...
...
@@ -27,7 +27,7 @@ public class OrderReturnController {
@Reference
(
validation
=
"true"
)
private
OrderReturnService
orderReturnService
;
@Reference
(
validation
=
"true"
)
@Reference
(
validation
=
"true"
,
version
=
"${dubbo.consumer.DataDictService.version}"
)
private
DataDictService
dataDictService
;
@GetMapping
(
"reason"
)
...
...
order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/service/OrderReturnServiceImpl.java
浏览文件 @
c550340c
...
...
@@ -53,7 +53,7 @@ public class OrderReturnServiceImpl implements OrderReturnService {
@Reference
(
validation
=
"true"
)
private
OrderLogisticsService
orderLogisticsService
;
@Reference
(
validation
=
"true"
)
@Reference
(
validation
=
"true"
,
version
=
"${dubbo.consumer.PayRefundService.version}"
)
private
PayRefundService
payRefundService
;
@Override
...
...
order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/service/OrderServiceImpl.java
浏览文件 @
c550340c
...
...
@@ -65,13 +65,13 @@ public class OrderServiceImpl implements OrderService {
@Autowired
private
CartServiceImpl
cartService
;
@Reference
(
validation
=
"true"
)
@Reference
(
validation
=
"true"
,
version
=
"${dubbo.consumer.PromotionActivityService.version}"
)
private
ProductSpuService
productSpuService
;
@Reference
(
validation
=
"true"
)
@Reference
(
validation
=
"true"
,
version
=
"${dubbo.consumer.UserAddressService.version}"
)
private
UserAddressService
userAddressService
;
@Reference
(
validation
=
"true"
)
@Reference
(
validation
=
"true"
,
version
=
"${dubbo.consumer.PayTransactionService.version}"
)
private
PayTransactionService
payTransactionService
;
@Reference
(
validation
=
"true"
)
@Reference
(
validation
=
"true"
,
version
=
"${dubbo.consumer.CouponService.version}"
)
private
CouponService
couponService
;
@Override
...
...
order/order-service-impl/src/main/resources/config/application.yaml
浏览文件 @
c550340c
...
...
@@ -33,6 +33,14 @@ dubbo:
version
:
1.0.0
CouponService
:
version
:
1.0.0
PayRefundService
:
version
:
1.0.0
UserAddressService
:
version
:
1.0.0
PayTransactionService
:
version
:
1.0.0
DataDictService
:
version
:
1.0.0
# logging
logging
:
...
...
pay/pay-service-impl/src/main/java/cn/iocoder/mall/pay/biz/component/DubboReferencePool.java
浏览文件 @
c550340c
...
...
@@ -58,7 +58,7 @@ public class DubboReferencePool {
reference
.
setInterface
(
notifyUrlParts
[
0
]);
// 弱类型接口名
reference
.
setGeneric
(
true
);
// 声明为泛化接口
reference
.
setApplication
(
application
);
reference
.
setVersion
(
"1.0.0
"
);
// TODO 芋艿,后面要优化下。
// reference.setVersion("*
"); // TODO 芋艿,后面要优化下。
// 获得 GenericService 对象
GenericService
genericService
=
reference
.
get
();
// 构建最终的 ReferenceMeta 对象
...
...
search/search-application/pom.xml
浏览文件 @
c550340c
...
...
@@ -38,15 +38,6 @@
<artifactId>
spring-boot-starter-web
</artifactId>
</dependency>
<dependency>
<groupId>
org.apache.dubbo
</groupId>
<artifactId>
dubbo
</artifactId>
</dependency>
<!--<dependency>-->
<!--<groupId>com.alibaba.boot</groupId>-->
<!--<artifactId>dubbo-spring-boot-starter</artifactId>-->
<!--</dependency>-->
<dependency>
<groupId>
org.apache.curator
</groupId>
<artifactId>
curator-framework
</artifactId>
...
...
search/search-service-impl/pom.xml
浏览文件 @
c550340c
...
...
@@ -32,6 +32,18 @@
<groupId>
org.apache.dubbo
</groupId>
<artifactId>
dubbo
</artifactId>
</dependency>
<dependency>
<groupId>
org.apache.curator
</groupId>
<artifactId>
curator-framework
</artifactId>
</dependency>
<dependency>
<groupId>
org.apache.curator
</groupId>
<artifactId>
curator-recipes
</artifactId>
</dependency>
<dependency>
<groupId>
org.apache.dubbo
</groupId>
<artifactId>
dubbo-spring-boot-starter
</artifactId>
</dependency>
<dependency>
<groupId>
com.google.guava
</groupId>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论