随笔 - 76  文章 - 0  评论 - 2  阅读 - 58188

dubbo问题

1、spring boot注解问题

EnableDubbo 在主方法上添加此注解
Reference获取暴露服务 此包com.alibaba.dubbo.config.annotation.Reference下边的
Service dubbo提供的暴露服务,此包com.alibaba.dubbo.config.annotation.Service下边的
上边三个注解过期,替换方法如下

// 2.7.x 之前,Alibaba时期
com.alibaba.dubbo.config.annotation.Reference
com.alibaba.dubbo.config.annotation.Service

// 2.7.0之后,Apache时期
org.apache.dubbo.config.annotation.Reference
org.apache.dubbo.config.annotation.Service

// 2.7.7之后
org.apache.dubbo.config.annotation.DubboReference
org.apache.dubbo.config.annotation.DubboService

2、dubbo创建问题,引入zookpeer

<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-framework</artifactId>
<version>2.12.0</version>
</dependency>

<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-recipes</artifactId>
<version>2.12.0</version>
</dependency>

 3、dubbo覆盖策略(优先级从上到下)

-D java启动参数

xml配置

properties

4、各个参数

timeout请求超时时间 check启动时检查服务 loadbalance:random(随机) roundRobin(轮询) leastActive(最小活跃调用数) consistentHash(一致性hash)

5、配置覆盖

方法级优先 接口次之 全局再次之

消费者优先 提供者次之

 

posted on   ttke  阅读(253)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 单线程的Redis速度为什么快?
· SQL Server 2025 AI相关能力初探
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 展开说说关于C#中ORM框架的用法!
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示