Eurake问题Failed to bind properties under 'eureka.client.service-url' to java.util.Map……

1.报错信息

Eurake问题Failed to bind properties under 'eureka.client.service-url' to java.util.Map……_第1张图片

2.报错原因

配置文件出错
Eurake问题Failed to bind properties under 'eureka.client.service-url' to java.util.Map……_第2张图片

3.解决方法

修改配置文件(defaultZone:忘记写了,空格问题也要注意吃过亏)

server:
  port: 7001  
eureka:
  instance:
    hostname: 127.0.0.1
  client:
    register-with-eureka: false   #是否将自己注册到eureka中
    fetch-registry: false         #是否从eureka中获取信息
    service-url:
      defaultZone: http://${
     eureka.instance.hostname}:${
     server.port}/eureka/
spring:
  application:
    name: eureka-server

你可能感兴趣的:(spring,spring,boot)