Caused by: org.yaml.snakeyaml.parser.ParserException: while parsing MappingNode in 'reader', line 4

Caused by: org.yaml.snakeyaml.parser.ParserException: while parsing MappingNode

Caused by: org.yaml.snakeyaml.parser.ParserException: while parsing MappingNode
 in 'reader', line 4, column 3:
      instance:
      ^
Duplicate key: client
 in 'reader', line 12, column 86:
     ... .hostname}:${server.port}/eureka
                                         ^

maven 项目加载配置文件报错:
这种类型是由于配置文件中有重复节点致使,错误的配置文件以下:node

server:
  port: 8761
eureka:
  instance:
    hostname: localhost
  client:
    healthcheck:
      enabled: true
  client:
    register-with-eureka: false
    fetch-registry: false
    service-url.defaultZone: http://${eureka.instance.hostname}:${server.port}/eureka

文件中 client 重复,删掉多余的那个 client 便可web