Describe the bug 1 - We upgraded Config Server and Config Client to SpringBoot 2.4.0 Illford 2020.0.0-M3 2 - We want to follow @spencergibb 's guide https://github.com/spring-cloud/spring-cloud-config/commit/76203019167194884e598739250f945109723a3d We do want to use the "new way". 3 - We configured this in our application.properties

server.port=8010
spring.application.name=mycoolservice
spring.config.import=optional:configserver:${SPRING_CLOUD_CONFIG_URI:https://localhost:8090}/config

4 - we deleted our old but working bootstrap.properties

server.port=9010
spring.application.name=mycoolservice
spring.cloud.config.uri=${SPRING_CLOUD_CONFIG_URI:https://localhost:8090}/config
spring.profiles.active=${SPRING_PROFILE_ACTIVE:local}

5 - we started the app and observed:

 ERROR [,,] 31987 --- [           main] o.s.boot.SpringApplication               : Application run failed

java.lang.IllegalStateException: Unable to load config data from 'optional:configserver:https://localhost:8090/config'
    at org.springframework.boot.context.config.StandardConfigDataLocationResolver.getReferences(StandardConfigDataLocationResolver.java:124) ~[spring-boot-2.4.0.jar:2.4.0]
    at org.springframework.boot.context.config.StandardConfigDataLocationResolver.resolve(StandardConfigDataLocationResolver.java:111) ~[spring-boot-2.4.0.jar:2.4.0]
    at org.springframework.boot.context.config.ConfigDataLocationResolvers.lambda$resolve$1(ConfigDataLocationResolvers.java:114) ~[spring-boot-2.4.0.jar:2.4.0]
    at org.springframework.boot.context.config.ConfigDataLocationResolvers.resolve(ConfigDataLocationResolvers.java:125) ~[spring-boot-2.4.0.jar:2.4.0]
    at org.springframework.boot.context.config.ConfigDataLocationResolvers.resolve(ConfigDataLocationResolvers.java:114) ~[spring-boot-2.4.0.jar:2.4.0]
    at org.springframework.boot.context.config.ConfigDataLocationResolvers.resolve(ConfigDataLocationResolvers.java:106) ~[spring-boot-2.4.0.jar:2.4.0]
    at org.springframework.boot.context.config.ConfigDataImporter.resolve(ConfigDataImporter.java:101) ~[spring-boot-2.4.0.jar:2.4.0]
    at org.springframework.boot.context.config.ConfigDataImporter.resolve(ConfigDataImporter.java:93) ~[spring-boot-2.4.0.jar:2.4.0]


Caused by: java.lang.IllegalStateException: File extension is not known to any PropertySourceLoader. If the location is meant to reference a directory, it must end in '/'
    at org.springframework.boot.context.config.StandardConfigDataLocationResolver.getReferencesForFile(StandardConfigDataLocationResolver.java:199) ~[spring-boot-2.4.0.jar:2.4.0]
    at org.springframework.boot.context.config.StandardConfigDataLocationResolver.getReferences(StandardConfigDataLocationResolver.java:121) ~[spring-boot-2.4.0.jar:2.4.0]
    ... 30 common frames omitted

What is the issue please?

Thank you

Comment From: ubaid4j

Hi, @patpatpat123 I just migrated to Spring Boot 2.4.0 and using Spring Cloud Version 2020.0.0-M5.

So, I rename my bootstrap.properties file to the application.properties and changed the following contents:

#------------------------App Level Configuration--------------------------#
spring.application.name=currency-exchange-service
server.port=8000

#------------------------Config Client  --------------------------#
spring.cloud.config.uri=http://config-server:8888

#------------------------Active Profile --------------------------#
spring.profiles.active=@activatedProperties@

to

#------------------------App Level Configuration--------------------------#
spring.application.name=currency-exchange-service
server.port=8000

#------------------------Config Client  --------------------------#
spring.config.import=optional:configserver:${SPRING_CLOUD_CONFIG_URI:http://localhost:8888}

#------------------------Active Profile --------------------------#
spring.profiles.active=@activatedProperties@

And It's working fine.

In your props file, can you change https to http.

Comment From: patpatpat123

Indeed, I get the error with M3, as soon as I update to M5, it is fixed.

Thank you, good to close

Comment From: patpatpat123

Just in case, maybe it would be interesting to document somewhere M3 and 2.4.0 are incompatible, as the current https://github.com/spring-cloud/spring-cloud-release/milestones does not go fully into detail. Maybe