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}/