惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
H
Hacker News: Front Page
P
Palo Alto Networks Blog
T
ThreatConnect
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
T
True Tiger Recordings
P
Privacy & Cybersecurity Law Blog
B
Blog
IT之家
IT之家
Last Week in AI
Last Week in AI
F
Full Disclosure
Hacker News: Ask HN
Hacker News: Ask HN
C
Comments on: Blog
Microsoft Azure Blog
Microsoft Azure Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Microsoft Security Blog
Microsoft Security Blog
博客园 - 【当耐特】
N
News and Events Feed by Topic
NISL@THU
NISL@THU
腾讯CDC
雷峰网
雷峰网
Security Latest
Security Latest
李成银的技术随笔
M
Microsoft Research Blog - Microsoft Research
L
LangChain Blog
L
Lohrmann on Cybersecurity
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Check Point Blog
Y
Y Combinator Blog
Recent Announcements
Recent Announcements
博客园 - Franky
N
News | PayPal Newsroom
V
V2EX
A
About on SuperTechFans
The Register - Security
The Register - Security
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google Online Security Blog
Google Online Security Blog
MyScale Blog
MyScale Blog
Cisco Talos Blog
Cisco Talos Blog
Vercel News
Vercel News
WordPress大学
WordPress大学
C
Cyber Attacks, Cyber Crime and Cyber Security
The Hacker News
The Hacker News
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
爱范儿
爱范儿
A
Arctic Wolf
L
LINUX DO - 最新话题
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

博客园 - 菜鸟乙

提示词 大模型实战 2-4 提示词聚合网站 提示词 大模型实战 1-1 提示词工程师导学 中间件 ZK分布式专题与Dubbo微服务入门 8-5 暴露商品服务 0-4min 中间件 ZK分布式专题与Dubbo微服务入门 9-4 获取分布式锁的流程 中间件 ZK分布式专题与Dubbo微服务入门 8-8 使用dubbo内置main打包jar启动 中间件 ZK分布式专题与Dubbo微服务入门 8-7 使用main主线程启动dubbo服务 中间件 ZK分布式专题与Dubbo微服务入门 8-6 使用tomcat启动dubbo服务 中间件 ZK分布式专题与Dubbo微服务入门 8-3 单体到分层模式代码演示 中间件 ZK分布式专题与Dubbo微服务入门 9-2 分布式锁的概念与数据最终不一致性的场景 中间件 ZK分布式专题与Dubbo微服务入门 7-9 zk-watcher实例 统一更新N台节点的配置文件 中间件 ZK分布式专题与Dubbo微服务入门 7-10 curator之acl权限操作与认证授权 中间件 ZK分布式专题与Dubbo微服务入门 9-1 死锁与活锁的概念 中间件 ZK分布式专题与Dubbo微服务入门 7-8 curator之PathChildrenCache子节点监听 中间件 ZK分布式专题与Dubbo微服务入门 8-1 架构演变过程 中间件 ZK分布式专题与Dubbo微服务入门 7-7 curator之nodeCache一次注册N次监听 中间件 ZK分布式专题与Dubbo微服务入门 7-6 curator之usingWatcher 中间件 ZK分布式专题与Dubbo微服务入门 7-5 查询节点相关信息 中间件 ZK分布式专题与Dubbo微服务入门 8-2 dubbo 入门简介 中间件 ZK分布式专题与Dubbo微服务入门 7-4 修改节点以及删除节点
中间件 ZK分布式专题与Dubbo微服务入门 8-4 重构商品服务,抽取抽象工程
菜鸟乙 · 2024-04-19 · via 博客园 - 菜鸟乙

0    课程地址

https://coding.imooc.com/lesson/201.html#mid=12742

1    重点关注

1.1    本节内容

Spring的maven项目抽取成Dubbo的maven项目前半部分

rpc调用图解

2    课程内容

2.1    rpc调用图解

rpc调用,我们调用的时候调用方直接调用的是api,并不会调用它实际实现的service。(自己理解:service和实现分别在不同的子项目中,实现会根据注解进行注册,消费方根据接service和注解找到对应的实现)

3    Coding

3.1    Spring的maven项目抽取成Dubbo的maven项目前半部分

  • pom文件引入dubbo和zk依赖(注意聚合的项目只是引用,具体哪个server需要就在哪个service所在项目的pom中进行引用该依赖)
    <dubbo.version>2.5.3</dubbo.version>
            <zookeeper.version>3.4.11</zookeeper.version>
            <zkclient.version>0.1</zkclient.version>
    
    
    
                <!-- 引入dubbo -->
                <dependency>
                    <groupId>com.alibaba</groupId>
                    <artifactId>dubbo</artifactId>
                    <version>${dubbo.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.apache.zookeeper</groupId>
                    <artifactId>zookeeper</artifactId>
                    <version>${zookeeper.version}</version>
                </dependency>
                <dependency>
                    <groupId>com.github.sgroschupf</groupId>
                    <artifactId>zkclient</artifactId>
                    <version>${zkclient.version}</version>
                </dependency>
  • service和pojo进行迁移到api子项目