Skip to content

Commit f84c3a4

Browse files
authored
Merge pull request #2 from YunaiV/master
同步代码
2 parents d300cd9 + 7db69bf commit f84c3a4

File tree

289 files changed

+8906
-96
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

289 files changed

+8906
-96
lines changed

README.md

+41-13
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
一个涵盖五个主流技术栈的**正经**仓库:
1+
> 友情提示:因为提供了 50000+ 行示例代码,所以艿艿默认注释了所有 Maven Module。
2+
>
3+
> 胖友可以根据自己的需要,修改 [`pom.xml`](https://github.com/YunaiV/SpringBoot-Labs/blob/master/pom.xml) 即可。
4+
5+
一个涵盖六个主流技术栈的**正经**仓库:
26
* [《Spring Boot 专栏》](https://github.com/YunaiV/SpringBoot-Labs#spring-boot-%E4%B8%93%E6%A0%8F)
37
* [《Spring Cloud Alibaba 专栏》](https://github.com/YunaiV/SpringBoot-Labs#spring-cloud-alibaba-%E4%B8%93%E6%A0%8F)
48
* [《Spring Cloud 专栏》](https://github.com/YunaiV/SpringBoot-Labs#spring-cloud-%E4%B8%93%E6%A0%8F)
@@ -35,7 +39,7 @@
3539

3640
* [《芋道 Spring Boot 热部署入门》](http://www.iocoder.cn/Spring-Boot/hot-swap/?github) 对应 [lab-48](https://github.com/YunaiV/SpringBoot-Labs/tree/master/lab-48)
3741
* [《芋道 Spring Boot 消除冗余代码 Lombok 入门》](http://www.iocoder.cn/Spring-Boot/Lombok/?github) 对应 [lab-49](https://github.com/YunaiV/SpringBoot-Labs/tree/master/lab-49)
38-
* 《芋道 Spring Boot 对象转换 MapStruct 入门》计划中...
42+
* [《芋道 Spring Boot 对象转换 MapStruct 入门》](http://www.iocoder.cn/Spring-Boot/MapStruct/?github) 对应 [lab-55](https://github.com/YunaiV/SpringBoot-Labs/tree/master/lab-55)
3943

4044
## Web 开发
4145

@@ -51,6 +55,7 @@
5155
## RPC 开发
5256

5357
* [《芋道 Spring Boot Dubbo 入门》](http://www.iocoder.cn/Spring-Boot/Dubbo/?github) 对应 [lab-30](https://github.com/YunaiV/SpringBoot-Labs/tree/master/lab-30)
58+
* [《芋道 Spring Boot 声明式调用 Feign 入门》](http://www.iocoder.cn/Spring-Boot/Feign/?github) 对应 [lab-58](https://github.com/YunaiV/SpringBoot-Labs/tree/master/lab-58)
5459
* 《芋道 Spring Boot Motan 入门》计划中...
5560
* 《芋道 Spring Boot WebService 入门》计划中...
5661
* 《芋道 Spring Boot SOFARPC 入门》计划中...
@@ -114,8 +119,8 @@
114119
## 服务容错
115120

116121
* [《芋道 Spring Boot 服务容错 Sentinel 入门》](http://www.iocoder.cn/Spring-Boot/Sentinel/?github) 对应 [lab-46](https://github.com/YunaiV/SpringBoot-Labs/tree/master/lab-46)
117-
* 《芋道 Spring Boot 服务容错 Hystrix 入门》计划中...
118-
* 《芋道 Spring Boot 服务容错 Resilience4j 入门》计划中...
122+
* [《芋道 Spring Boot 服务容错 Hystrix 入门》](http://www.iocoder.cn/Spring-Boot/Hystrix/?github) 对应 [lab-57](https://github.com/YunaiV/SpringBoot-Labs/tree/master/lab-57)
123+
* [《芋道 Spring Boot 服务容错 Resilience4j 入门》](http://www.iocoder.cn/Spring-Boot/Resilience4j/?github) 对应 [lab-59](https://github.com/YunaiV/SpringBoot-Labs/tree/master/lab-59)
119124

120125
## 监控管理
121126

@@ -162,7 +167,7 @@
162167
## 注册中心
163168

164169
* [《芋道 Spring Cloud Alibaba 注册中心 Nacos 入门》](http://www.iocoder.cn/Spring-Cloud-Alibaba/Nacos-Discovery/?github) 对应 [labx-01](https://github.com/YunaiV/SpringBoot-Labs/tree/master/labx-01)
165-
* 《芋道 Spring Cloud Netflix 注册中心 Eureka 入门》计划中...
170+
* [《芋道 Spring Cloud Netflix 注册中心 Eureka 入门》](http://www.iocoder.cn/Spring-Cloud/Netflix-Eureka?github) 对应 [labx-22](https://github.com/YunaiV/SpringBoot-Labs/tree/master/labx-22)
166171
* 《芋道 Spring Cloud 注册中心 Zookeeper 入门》计划中...
167172
* 《芋道 Spring Cloud 注册中心 Consul 入门》计划中...
168173
* 《芋道 Spring Cloud 注册中心 Etcd 入门》计划中...
@@ -176,15 +181,22 @@
176181
## 服务容错
177182

178183
* [《芋道 Spring Cloud Alibaba 服务容错 Sentinel 入门》](http://www.iocoder.cn/Spring-Cloud-Alibaba/Sentinel/?github) 对应 [labx-04](https://github.com/YunaiV/SpringBoot-Labs/tree/master/labx-04)
179-
* 《芋道 Spring Cloud Netflix 服务容错 Hystrix 入门》计划中...
180-
* 《芋道 Spring Cloud 服务容错 Resilience4j 入门》计划中...
184+
* [《芋道 Spring Cloud Netflix 服务容错 Hystrix 入门》](http://www.iocoder.cn/Spring-Cloud/Netflix-Hystrix/?github) 对应 [labx-23](https://github.com/YunaiV/SpringBoot-Labs/tree/master/labx-23)
185+
* [《芋道 Spring Cloud 服务容错 Resilience4j 入门》](http://www.iocoder.cn/Spring-Cloud/Resilience4j/?github) 对应 [lab-59](https://github.com/YunaiV/SpringBoot-Labs/tree/master/lab-59)
186+
* 《芋道 Spring Cloud 服务容错 Spring Cloud CircuitBreaker》计划中...
181187

182188
## API 网关
183189

184190
* [《芋道 Spring Cloud 服务网关 Spring Cloud Gateway 入门》](http://www.iocoder.cn/Spring-Cloud/Spring-Cloud-Gateway/?github) 对应 [labx-08](https://github.com/YunaiV/SpringBoot-Labs/tree/master/labx-08)
185-
* 《芋道 Spring Cloud Netflix 服务网关 Zuul 入门》计划中...
191+
* [《芋道 Spring Cloud Netflix 服务网关 Zuul 入门》](http://www.iocoder.cn/Spring-Cloud/Netflix-Zuul/?github) 对应 对应 [labx-21](https://github.com/YunaiV/SpringBoot-Labs/tree/master/labx-21)
186192
* [《性能测试 —— Spring Cloud Gateway、Zuul 基准测试》](http://www.iocoder.cn/Performance-Testing/SpringCloudGateway-Zuul-benchmark/?github) 对应 [lab-07](https://github.com/YunaiV/SpringBoot-Labs/tree/master/lab-07)
187193

194+
> 如下非 Spring Cloud 网关,先放在这里...
195+
196+
* [《芋道 APISIX 极简入门(国产微服务网关)》](http://www.iocoder.cn/APISIX/install/?github) 对应 [lab-56](https://github.com/YunaiV/SpringBoot-Labs/tree/master/lab-56)
197+
* [《芋道 Soul 极简入门(国产微服务网关)》](http://www.iocoder.cn/Soul/install/?github) 对应 [lab-60](https://github.com/YunaiV/SpringBoot-Labs/tree/master/lab-60)
198+
* [《芋道 Kong 极简入门(微服务网关)》](http://www.iocoder.cn/Kong/install/?github) 对应 [lab-56](https://github.com/YunaiV/SpringBoot-Labs/tree/master/lab-56)
199+
188200
## 配置中心
189201

190202
* [《芋道 Spring Cloud Alibaba 配置中心 Nacos 入门》](http://www.iocoder.cn/Spring-Cloud-Alibaba/Nacos-Config/?github) 对应 [labx-05](https://github.com/YunaiV/SpringBoot-Labs/tree/master/labx-05)
@@ -240,19 +252,35 @@
240252
* [《芋道 Spring Boot Dubbo 入门》](http://www.iocoder.cn/Spring-Boot/Dubbo/?github)[「2. XML 配置」](#)[「3. 注解配置」](#)小节
241253

242254
**[Nacos](http://www.iocoder.cn/Nacos/install/?github)**
255+
* [《芋道 Spring Boot Dubbo 入门》](http://www.iocoder.cn/Spring-Boot/Dubbo/?github)[「6. 整合 Nacos」](#)小节
243256
* [《芋道 Spring Cloud Alibaba 服务调用 Dubbo 入门》](http://www.iocoder.cn/Spring-Cloud-Alibaba/Dubbo/?github)[「2. 快速入门」](#)小节
244257

245-
## 服务保障
258+
## 服务容错
246259

247260
**[Sentinel](http://www.iocoder.cn/Sentinel/install/?github)**
261+
* [《芋道 Spring Boot Dubbo 入门》](http://www.iocoder.cn/Spring-Boot/Dubbo/?github)[「7. 整合 Sentinel」](#)小节
248262
* [《芋道 Spring Cloud Alibaba 服务调用 Dubbo 入门》](http://www.iocoder.cn/Spring-Cloud-Alibaba/Dubbo/?github)[「6. 整合 Sentinel」](#)小节
249263

264+
**[Hystrix](http://www.iocoder.cn/categories/Hystrix/?github)**
265+
* [《芋道 Spring Boot 服务容错 Hystrix 入门》](http://www.iocoder.cn/Spring-Boot/Hystrix/?github)[「6. 集成到 Dubbo」](#)小节
266+
* [《芋道 Spring Cloud Netflix 服务容错 Hystrix 入门》](http://www.iocoder.cn/Spring-Cloud/Netflix-Hystrix/?github)[「10. 集成到 Dubbo」](#)小节
267+
268+
**[Resilience4j](http://www.iocoder.cn/categories/Resilience4j/?github)**
269+
* [《芋道 Spring Boot 服务容错 Resilience4j 入门》](http://www.iocoder.cn/Spring-Boot/Resilience4j/?github)[「10. 集成到 Dubbo」](#)小节
270+
271+
## API 网关
272+
273+
* [《芋道 Soul 极简入门(国产微服务网关)》](http://www.iocoder.cn/Soul/install/?github)[「3. 接入 Dubbo 应用」](#)小节
274+
250275
## 分布式事务
251276

252277
**[Seata](http://www.iocoder.cn/Seata/install/?github)**
253278
* [《芋道 Dubbo 分布式事务 Seata 入门》](http://www.iocoder.cn/Dubbo/Seata/?github) 对应 [lab-53](https://github.com/YunaiV/SpringBoot-Labs/tree/master/lab-53)
254279
* [《芋道 Spring Cloud Alibaba 分布式事务 Seata 入门》](http://www.iocoder.cn/Spring-Cloud-Alibaba/Seata/?github)[「2. AT 模式 + Dubbo」](#)小节
255280

281+
**[TCC Transaction](http://www.iocoder.cn/categories/TCC-Transaction/?github)**
282+
* [《TCC-Transaction 源码分析 —— Dubbo 支持》](http://www.iocoder.cn/TCC-Transaction/dubbo-support/?self)
283+
256284
## 链路追踪
257285

258286
**[SkyWalking](http://www.iocoder.cn/SkyWalking/install/?github)**
@@ -267,7 +295,7 @@
267295

268296
## RocketMQ
269297

270-
* [《RocketMQ 安装部署](http://www.iocoder.cn/RocketMQ/install/?github)
298+
* [《RocketMQ 极简入门](http://www.iocoder.cn/RocketMQ/install/?github)
271299
* [《芋道 Spring Boot 消息队列 RocketMQ 入门》](http://www.iocoder.cn/Spring-Boot/RocketMQ/?github) 对应 [lab-31](https://github.com/YunaiV/SpringBoot-Labs/tree/master/lab-31)
272300
* [《芋道 Spring Cloud Alibaba 消息队列 RocketMQ 入门》](http://www.iocoder.cn/Spring-Cloud-Alibaba/RocketMQ/?github) 对应 [labx-06](https://github.com/YunaiV/SpringBoot-Labs/tree/master/labx-06)
273301
* [《芋道 Spring Cloud Alibaba 事件总线 Bus RocketMQ 入门》](http://www.iocoder.cn/Spring-Cloud-Alibaba/Bus-RocketMQ/?github) 对应 [labx-20](https://github.com/YunaiV/SpringBoot-Labs/tree/master/labx-20)
@@ -277,23 +305,23 @@
277305

278306
## RabbitMQ
279307

280-
* [《RabbitMQ 安装部署](http://www.iocoder.cn/RabbitMQ/install/?github)
308+
* [《RabbitMQ 极简入门](http://www.iocoder.cn/RabbitMQ/install/?github)
281309
* [《芋道 Spring Boot 消息队列 RabbitMQ 入门》](http://www.iocoder.cn/Spring-Boot/RabbitMQ/?github) 对应 [lab-04](https://github.com/YunaiV/SpringBoot-Labs/tree/master/lab-04)
282310
* [《芋道 Spring Cloud 消息队列 RabbitMQ 入门》](http://www.iocoder.cn/Spring-Cloud/RabbitMQ/?github) 对应 [labx-10](https://github.com/YunaiV/SpringBoot-Labs/tree/master/labx-10)
283311
* [《芋道 Spring Cloud 事件总线 Bus RabbitMQ 入门》](http://www.iocoder.cn/Spring-Cloud/Bus-RabbitMQ/?github) 对应 [labx-19](https://github.com/YunaiV/SpringBoot-Labs/tree/master/labx-19)
284312
* [《RabbitMQ 书单整理》](http://www.iocoder.cn/Books/RabbitMQ-books-recommended/?github)
285313

286314
## Kafka
287315

288-
* [《Kafka 安装部署](http://www.iocoder.cn/Kafka/install/?github)
316+
* [《Kafka 极简入门](http://www.iocoder.cn/Kafka/install/?github)
289317
* [《芋道 Spring Boot 消息队列 Kafka 入门》](http://www.iocoder.cn/Spring-Boot/Kafka/?github) 对应 [lab-03](https://github.com/YunaiV/SpringBoot-Labs/tree/master/lab-03)
290318
* [《芋道 Spring Cloud 消息队列 Kafka 入门》](http://www.iocoder.cn/Spring-Cloud/Kafka/?github) 对应 [labx-11](https://github.com/YunaiV/SpringBoot-Labs/tree/master/labx-11)
291319
* [《芋道 Spring Cloud 事件总线 Bus Kafka 入门》](http://www.iocoder.cn/Spring-Cloud/Bus-Kafka/?github) 对应 [labx-18](https://github.com/YunaiV/SpringBoot-Labs/tree/master/labx-18)
292320
* [《Kafka 书单整理》](http://www.iocoder.cn/Books/Kafka-books-recommended/?github)
293321

294322
## ActiveMQ
295323

296-
* [《ActiveMQ 安装部署](http://www.iocoder.cn/ActiveMQ/install/?github)
324+
* [《ActiveMQ 极简入门](http://www.iocoder.cn/ActiveMQ/install/?github)
297325
* [《芋道 Spring Boot 消息队列 ActiveMQ 入门》](http://www.iocoder.cn/Spring-Boot/ActiveMQ/?github) 对应 [lab-32](https://github.com/YunaiV/SpringBoot-Labs/tree/master/lab-32)
298326
* [《芋道 Spring Cloud 消息队列 ActiveMQ 入门》](http://www.iocoder.cn/Spring-Cloud/ActiveMQ/?github)
299327

lab-08/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
</dependency>
2020
<!-- <dependency>-->
2121
<!-- <groupId>org.springframework.boot</groupId>-->
22-
<!-- <artifactId>spring-boot-starter-data-jpa</artifactId>-->
22+
<!-- <artifa ctId>spring-boot-starter-data-jpa</artifactId>-->
2323
<!-- </dependency>-->
2424

2525
<dependency>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<parent>
6+
<artifactId>lab-30</artifactId>
7+
<groupId>cn.iocoder.springboot.labs</groupId>
8+
<version>1.0-SNAPSHOT</version>
9+
</parent>
10+
<modelVersion>4.0.0</modelVersion>
11+
12+
<artifactId>lab-30-dubbo-annotations-nacos</artifactId>
13+
<packaging>pom</packaging>
14+
<modules>
15+
<module>user-rpc-service-api-03</module>
16+
<module>user-rpc-service-provider-03</module>
17+
<module>user-rpc-service-consumer-03</module>
18+
</modules>
19+
20+
21+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<parent>
6+
<artifactId>lab-30-dubbo-annotations-demo</artifactId>
7+
<groupId>cn.iocoder.springboot.labs</groupId>
8+
<version>1.0-SNAPSHOT</version>
9+
</parent>
10+
<modelVersion>4.0.0</modelVersion>
11+
12+
<artifactId>user-rpc-service-api-03</artifactId>
13+
14+
15+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package cn.iocoder.springboot.lab30.rpc.api;
2+
3+
import cn.iocoder.springboot.lab30.rpc.dto.UserDTO;
4+
5+
/**
6+
* 用户服务 RPC Service 接口
7+
*/
8+
public interface UserRpcService {
9+
10+
/**
11+
* 根据指定用户编号,获得用户信息
12+
*
13+
* @param id 用户编号
14+
* @return 用户信息
15+
*/
16+
UserDTO get(Integer id);
17+
18+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
package cn.iocoder.springboot.lab30.rpc.dto;
2+
3+
import java.io.Serializable;
4+
5+
/**
6+
* 用户信息 DTO
7+
*/
8+
public class UserDTO implements Serializable {
9+
10+
/**
11+
* 用户编号
12+
*/
13+
private Integer id;
14+
/**
15+
* 昵称
16+
*/
17+
private String name;
18+
/**
19+
* 性别
20+
*/
21+
private Integer gender;
22+
23+
public Integer getId() {
24+
return id;
25+
}
26+
27+
public UserDTO setId(Integer id) {
28+
this.id = id;
29+
return this;
30+
}
31+
32+
public String getName() {
33+
return name;
34+
}
35+
36+
public UserDTO setName(String name) {
37+
this.name = name;
38+
return this;
39+
}
40+
41+
public Integer getGender() {
42+
return gender;
43+
}
44+
45+
public UserDTO setGender(Integer gender) {
46+
this.gender = gender;
47+
return this;
48+
}
49+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<parent>
6+
<groupId>org.springframework.boot</groupId>
7+
<artifactId>spring-boot-starter-parent</artifactId>
8+
<version>2.2.1.RELEASE</version>
9+
<relativePath/> <!-- lookup parent from repository -->
10+
</parent>
11+
<modelVersion>4.0.0</modelVersion>
12+
13+
<artifactId>user-rpc-service-consumer-03</artifactId>
14+
15+
<dependencies>
16+
<!-- 引入定义的 Dubbo API 接口 -->
17+
<dependency>
18+
<groupId>cn.iocoder.springboot.labs</groupId>
19+
<artifactId>user-rpc-service-api-03</artifactId>
20+
<version>1.0-SNAPSHOT</version>
21+
</dependency>
22+
23+
<!-- 引入 Spring Boot 依赖 -->
24+
<dependency>
25+
<groupId>org.springframework.boot</groupId>
26+
<artifactId>spring-boot-starter</artifactId>
27+
</dependency>
28+
29+
<!-- 实现对 Dubbo 的自动化配置 -->
30+
<dependency>
31+
<groupId>org.apache.dubbo</groupId>
32+
<artifactId>dubbo</artifactId>
33+
<version>2.7.4.1</version>
34+
</dependency>
35+
<dependency>
36+
<groupId>org.apache.dubbo</groupId>
37+
<artifactId>dubbo-spring-boot-starter</artifactId>
38+
<version>2.7.4.1</version>
39+
</dependency>
40+
41+
<!-- 使用 Zookeeper 作为注册中心 -->
42+
<!-- <dependency>-->
43+
<!-- <groupId>org.apache.curator</groupId>-->
44+
<!-- <artifactId>curator-framework</artifactId>-->
45+
<!-- <version>2.13.0</version>-->
46+
<!-- </dependency>-->
47+
<!-- <dependency>-->
48+
<!-- <groupId>org.apache.curator</groupId>-->
49+
<!-- <artifactId>curator-recipes</artifactId>-->
50+
<!-- <version>2.13.0</version>-->
51+
<!-- </dependency>-->
52+
53+
<!-- 使用 Nacos 作为注册中心 -->
54+
<dependency>
55+
<groupId>com.alibaba.nacos</groupId>
56+
<artifactId>nacos-client</artifactId>
57+
<version>1.2.1</version>
58+
</dependency>
59+
<dependency>
60+
<groupId>org.apache.dubbo</groupId>
61+
<artifactId>dubbo-registry-nacos</artifactId>
62+
<version>2.7.4.1</version>
63+
</dependency>
64+
65+
</dependencies>
66+
67+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
package cn.iocoder.springboot.lab30.rpc;
2+
3+
import cn.iocoder.springboot.lab30.rpc.api.UserRpcService;
4+
import cn.iocoder.springboot.lab30.rpc.dto.UserDTO;
5+
import org.apache.dubbo.config.annotation.Reference;
6+
import org.slf4j.Logger;
7+
import org.slf4j.LoggerFactory;
8+
import org.springframework.boot.CommandLineRunner;
9+
import org.springframework.boot.SpringApplication;
10+
import org.springframework.boot.autoconfigure.SpringBootApplication;
11+
import org.springframework.context.ConfigurableApplicationContext;
12+
import org.springframework.stereotype.Component;
13+
14+
@SpringBootApplication
15+
public class ConsumerApplication {
16+
17+
public static void main(String[] args) {
18+
// 启动 Spring Boot 应用
19+
ConfigurableApplicationContext context = SpringApplication.run(ConsumerApplication.class, args);
20+
}
21+
22+
@Component
23+
public class UserRpcServiceTest implements CommandLineRunner {
24+
25+
private final Logger logger = LoggerFactory.getLogger(getClass());
26+
27+
@Reference(version = "${dubbo.consumer.UserRpcService.version}")
28+
private UserRpcService userRpcService;
29+
30+
@Override
31+
public void run(String... args) throws Exception {
32+
UserDTO user = userRpcService.get(1);
33+
logger.info("[run][发起一次 Dubbo RPC 请求,获得用户为({})", user);
34+
}
35+
36+
}
37+
38+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# dubbo 配置项,对应 DubboConfigurationProperties 配置类
2+
dubbo:
3+
# Dubbo 应用配置
4+
application:
5+
name: user-service-consumer # 应用名
6+
# Dubbo 注册中心配置
7+
registry:
8+
address: nacos://127.0.0.1:8848 # 注册中心地址。个鞥多注册中心,可见 http://dubbo.apache.org/zh-cn/docs/user/references/registry/introduction.html 文档。
9+
# Dubbo 消费者配置
10+
consumer:
11+
timeout: 1000 # 【重要】远程服务调用超时时间,单位:毫秒。默认为 1000 毫秒,胖友可以根据自己业务修改
12+
UserRpcService:
13+
version: 1.0.0

0 commit comments

Comments
 (0)