NativeEnvironmentRepository in Greenwich.RELEASE version spring-cloud-config-server File System Backend not work 'native.search-locations: file:///D:/code'??
HI,
I am using Spring Cloud Greenwich.RELEASE version with spring-cloud-config-server '2.1.0.RELEASE',
when I configuration spring.cloud.config.server.native.search-locations: file:///D:/code/abvc/config-server/target/config-repo but cannot read file.
config-repo
|-dev |--|- application.properties |--|- abvc-user-service.properties |-test |--|- application.properties |--|- abvc-user-service.properties ...
I found the under class
package org.springframework.cloud.config.server.environment;
public class NativeEnvironmentRepository
implements EnvironmentRepository, SearchPathLocator, Ordered {
}
vs old version is miss @ConfigurationProperties("spring.cloud.config.server.native") because it is already set
package org.springframework.cloud.config.server.environment
@ConfigurationProperties("spring.cloud.config.server.native")
public class NativeEnvironmentProperties implements EnvironmentRepositoryProperties{ ... }
Actually no effect。
when I visit
http://127.0.0.1:8888/dev/abvc-user-service.properties
is empty
when I set spring.cloud.config.server.native.search-locations: classpath:config-repo/ is work fine!
and now it is a bug?
Can you provide a complete, minimal, verifiable sample that reproduces the problem? It should be available as a GitHub (or similar) project or attached to this issue as a zip file.
@ryanjbaxter OK, I have create the Minimal project for the same problem Spring Cloud Config Server Demo please.
I have no problem when using your sample and pointing towards my own native config repo. Here is what I got when I hit /application/default/master
{
"name":"application",
"profiles":[
"default"
],
"label":"master",
"version":null,
"state":null,
"propertySources":[
{
"name":"file:///Users/ryanjbaxter/git-repos/ryanjbaxter/spring-cloud-samples/config-repo/application.yml (document #0)",
"source":{
"info.description":"Spring Cloud Samples",
"info.url":"https://github.com/spring-cloud-samples",
"eureka.client.serviceUrl.defaultZone":"http://localhost:8761/eureka/"
}
}
]
}
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
I have make another person run the demo, have the same error. Quite strange~~
Without a way to reproduce it locally there is not much we can do to help
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.