35 lines
1.3 KiB
YAML
35 lines
1.3 KiB
YAML
--- #################### 注册中心 + 配置中心相关配置 ####################
|
|
|
|
spring:
|
|
cloud:
|
|
nacos:
|
|
server-addr: 192.168.81.193:8848 # Nacos 服务器地址
|
|
username: nacos
|
|
password: nacos
|
|
discovery: # 【配置中心】配置项
|
|
namespace: e682c31c-a86b-4bbd-b655-9e19d7215b2a # 命名空间。这里使用 dev 开发环境
|
|
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
|
|
config: # 【注册中心】配置项
|
|
namespace: e682c31c-a86b-4bbd-b655-9e19d7215b2a # 命名空间。这里使用 dev 开发环境
|
|
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
|
|
|
|
--- #################### 监控相关配置 ####################
|
|
|
|
# Actuator 监控端点的配置项
|
|
management:
|
|
endpoints:
|
|
web:
|
|
base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
|
|
exposure:
|
|
include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
|
|
|
|
# Spring Boot Admin 配置项
|
|
spring:
|
|
boot:
|
|
admin:
|
|
# Spring Boot Admin Client 客户端的相关配置
|
|
client:
|
|
instance:
|
|
service-host-type: IP # 注册实例时,优先使用 IP [IP, HOST_NAME, CANONICAL_HOST_NAME]
|
|
username: admin
|
|
password: admin |