I have configued Spring Boot Config server (2.4.1 version) integrated with Git repository.
Config looks valid, there is no issue during loading files from git, however when I point to
localhoast:port/application/dev
i get
{"name":"application","profiles":["dev"],"label":null,"version":"7e67e69e075b05d9fa50e3255deef7585ed658c7","state":null,"propertySources":[]}
I turned on logging everything and I discovered, that config server downloaded file correctly and saved file somewhere in temp folder like:
` (1) C:/Users/username/AppData/Local/Temp/config-repo-5493381163789847226/`
however NativeEnironmentRepository is expecting that it will be in:
(2) C:\Users\username\AppData\Local\Temp\config-repo-5493381163789847226\
which is also valid windows path.
When I turn on debugging I found out that NativeEnvironmentRepository check path (1)
against pattern (2) and it fails. So in result
"propertySources":[]
is empty.
It looks like NativeEnvironmentRepository should use system File.separator...
Comment From: spencergibb
2.4.1 version is the version of spring boot, this version does not exist for spring cloud config server. What version are you using?
Comment From: bberus
im using:
and I did not changed version of config server.
As I see in libs config server is 3.0.0-RC1
Comment From: spencergibb
I just want to point out that spring boot knows nothing of spring cloud versions. You have to manually declare which version of spring cloud you want to import.
Comment From: bberus
Yes you are right. I generated projekt thru spring.io using defaults and only dependency which I added was config-server.
So be defualt spring clouse version is:
To be clear - i did not changed pom file after downloading project from spring.io, so spring cloud version is as above and in result config server is 3.0.0-RC1, which is newest as I checked.
Comment From: Fornori
Yep, I have the same issue. The error is in the line:
// TODO: needed anymore?
name = name.replace("applicationConfig: [", "");
name = name.replace("]", "");
The input name values is
Config resource 'file [C:\Users\eyfel\AppData\Local\Temp\config-repo-2920600667286371418\pits-erp-scheduler-qa.yml]' via location 'file:/C:/Users/eyfel/AppData/Local/Temp/config-repo-2920600667286371418/'
But you try to replace the old patter
Comment From: Fornori
@bberus It's already fixed in the SNAPSHOT version: this commit: https://github.com/spring-cloud/spring-cloud-config/commit/a2087e05fb1e000cd34dac9ee006aa4cf059c429
Comment From: bberus
so what version of spring-cloud-config-server should I use?
Comment From: Fornori
springCloudBomVersion = '2020.0.0-SNAPSHOT'
springCloudVersion = '3.0.0-SNAPSHOT'
springCloudSecurityVersion = "3.0.0-SNAPSHOT"
Comment From: bberus
ok I can confirm that in 2020.0.0-SNAPSHOT is working fine. looks like ticket can be closed.
Thanks!