# 杜发根_stage3_module5 **Repository Path**: dufg/stage_3_module_5 ## Basic Information - **Project Name**: 杜发根_stage3_module5 - **Description**: 阶段三,模块五作业 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-05-17 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 杜发根_stage3_module5 #### 介绍 阶段三,模块五作业 #### 作业配置说明 1. nacos注册中心及配置中心 ```yml nacos: config: server-addr: 127.0.0.1:8848 #nacos配置中心地址 namespace: 2fa2aea0-5a87-4981-964d-fac5f10ce8d0 #命名空间 group: DEFAULT_GROUP #分组 file-extension: yaml #文件后缀 discovery: server-addr: 127.0.0.1:8848 #nacos注册中心地址 ``` 2,sentinel ```yml datasource: type: com.alibaba.druid.pool.DruidDataSource #连接池类型 driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://106.52.183.70:3306/cofb_cloud? useUnicode=true&characterEncoding=utf-8&useSSL=false username: root password: 123456 cloud: nacos: config: server-addr: 127.0.0.1:8848 #nacos配置中心地址 namespace: 2fa2aea0-5a87-4981-964d-fac5f10ce8d0 #命名空间 group: DEFAULT_GROUP #分组 file-extension: yaml #文件后缀 discovery: server-addr: 127.0.0.1:8848 #nacos注册中心地址 sentinel: transport: port: 8721 dashboard: 127.0.0.1:8080 ``` 3,dubbo ```yml #dubbo服务提供者配置 dubbo: protocol: name: dubbo port: -1 # dubbo 协议端口( -1 表示自增端口,从 20880 开始) scan: base-packages: com.dufg.service # dubbo 服务扫描基准包 registry: address: spring-cloud://127.0.0.1 # 挂载到 Spring Cloud 注册中心 ``` ```yml #dubbo消费者配置 dubbo: registry: address: spring-cloud://localhost # 挂载到 Spring Cloud 注册中心 cloud: subscribed-services: email-service # 订阅服务提供方的应用列表,订阅多个服务提供者使用 "," 连接 ```