zn-cloud-wcs/yudao-module-grpc/yudao-module-grpc-biz/src/main/resources/application-local.yaml
2025-01-03 16:59:48 +08:00

58 lines
2.0 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# grpc配置
grpc:
# grpc clienT相关配置
client:
# 是服务端配置的名字GrpcClient注解会用到
ChassisNavigationService:
address: 'static://192.168.10.78:6914'
# gRPC服务端地址
# host: 192.168.10.78
# port: 6914
# 是否开启保持连接(长连接)
enableKeepAlive: true
# 保持连接时长默认20s
keepAliveTimeout: 100
# 没有RPC调用时是否保持连接默认false可禁用避免额外消耗CPU
keepAliveWithoutCalls: false
# 客户端负载均衡策略(round_robin默认, pick_first)
defaultLoadBalancingPolicy: round_robin
# 通信类型
# plaintext | plaintext_upgrade | tls
# 明文通信且http/2 | 明文通信且升级http/1.1为http/2 | 使用TLSALPN/NPN通信
negotiationType: plaintext
spring:
cloud:
nacos:
server-addr: localhost:8848 # Nacos 服务器地址
username: # Nacos 账号
password: # Nacos 密码
discovery: # 【配置中心】配置项
namespace: dev # 命名空间。这里使用 dev 开发环境
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
metadata:
version: 1.0.0 # 服务实例的版本号,可用于灰度发布
config: # 【注册中心】配置项
namespace: dev # 命名空间。这里使用 dev 开发环境
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
# Lock4j 配置项
lock4j:
acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
--- #################### 监控相关配置 ####################
# Actuator 监控端点的配置项
management:
endpoints:
web:
base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
exposure:
include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。