Spring Cloud Config - File extension is not known to any PropertySourceLoader in Openshift

Here is my application.yml

spring: application: name: app version: @project.version@ config: import: optional:configserver:${CLOUD_CONFIG_SERVER_URL} cloud: config: uri: ${CLOUD_CONFIG_SERVER_URL} username: ${CLOUD_CONFIG_USERNAME} password: ${CLOUD_CONFIG_PASSWORD} label: ${CLOUD_CONFIG_LABEL:develop} 

The dependency I'm using is

<dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-config</artifactId> </dependency> 

Spring Boot v2.4.5, Maven multi-module project. The application properties are in 'boot' module.

Locally everything is working, but in Openshift I always get:

"File extension is not known to any PropertySourceLoader. If the location is meant to reference a directory, it must end in '/'"

Not really sure what could be missed out.

1 Answer

I have encountered with the same issue and I have resolved by adding "/" after config: import statement.

config: import: optional:configserver:${CLOUD_CONFIG_SERVER_URL}/ 

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like