# 1. server server: port: 9102 servlet: context-path: /resource # 2.log logging: config: classpath:logback-spring.xml level: '[com.evotech.hd.resource.dao]': debug # 3.spring spring: # 服务名称必须带上,不然nacos服务列表中没有,也不会有注册成功的信息 application: name: resource-server config: import: - nacos:${spring.application.name}.yaml?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 # 为springbootadmin开启所有检查 management: endpoints: web: exposure: include: "*" endpoint: health: show-details: always # xml文件中配置的日志文件的名称 logfile: external-file: /logs/resource/resource-server.log