[Solved] Failed to load property source from location ‘classpath:/application.yml‘

java.lang.IllegalStateException: Failed to load property source from location ‘classpath:/application.yml’


Caused by:

Error Reason:
register-with-eureka: false and service-url: are not aligned in the application.yml configuration file

server:
  port: 7001
eureka:
  instance:
    hostname: www.eureka7001.com
  client:
    fetch-registry: false  
    register-with-eureka: false 
    service-url:
       defaultZone: http://${eureka.instance.hostname}:${server.port}/eureka/  

Read More: