# 1. server server: port: 9103 servlet: context-path: /cloud # 2.log logging: config: classpath:logback-spring.xml level: '[com.evotech.hd.cloud.dao]': debug # 3.spring spring: # 服务名称必须带上,不然nacos服务列表中没有,也不会有注册成功的信息 application: name: ${cloud-manage-server:cloud-server} jackson: timeZone: GMT+08:00 date-format: yyyy-MM-dd HH:mm:ss serialization: write-dates-as-timestamps: false config: import: - nacos:yt-common.properties?refreshEnabled=true - nacos:cloud-server.yaml?refreshEnabled=true - nacos:yt-redis.yaml?refreshEnabled=true - nacos:yt-influxdb.yml?refreshEnabled=true cloud: nacos: serverAddr: 192.168.5.213:8848 username: nacos password: nacos discovery: namespace: ${nacos.namespace:public} register-enabled: true #server-addr: 10.10.1.6:8848 #ip: 10.10.1.2 # 因添加了context-path,admin-server要想发现正确路径,需要加这个 metadata: management: context-path: ${server.servlet.context-path}/actuator config: namespace: ${nacos.namespace:public} # boot: # admin: # client: # # admin-server地址 用了nacos,admin也注册到nacos了,会自动拉取服务,不用这个了 ## url: http://192.168.151.111:9009/admin # # 配置admin-server的账号和密码 # username: jdyl # password: jdyl123 # 添加这个,客户端就显示ip,而不是主机名,我用nacos是显示的主机名 # instance: # prefer-ip: true # 为springbootadmin开启所有检查 management: endpoints: web: exposure: include: "*" endpoint: health: show-details: always # xml文件中配置的日志文件的名称 logfile: external-file: /logs/cloud/cloud-server.log