spring-cloud / spring-cloud-consul

Spring Cloud Consul
http://cloud.spring.io/spring-cloud-consul/
Apache License 2.0
813 stars 541 forks source link

Cannot load application with consul as config center #724

Closed vantis-zh closed 3 years ago

vantis-zh commented 3 years ago

Describe the bug I'm trying to launch an app with consul as a config center, but it failed with the error: File extension is not known to any PropertySourceLoader.

BTW the properties has been loaded successfully due to my log but the app failed to launch.

Sample application.yml:

spring:
  application:
    name:
      vochat-gateway
  cloud:
    consul:
      config:
        format: yaml

with JAVA_OPTS=-Dspring.config.import=consul:

spencergibb commented 3 years ago

Can you provide your dependencies?

vantis-zh commented 3 years ago

Can you provide your dependencies?

Sorry, it's already solved. I moved consul address config to docker JVM option and it works.