Using spring cloud config 3.1.3 Embedded server and using s3 as backend
bootstrap.yml
spring.profiles.active:
- uat
- awss3
spring.cloud.config.server:
bootstrap: true
awss3:
region: ap-east-1
bucket: bucketname
application.yml
spring.config.activate.on-profile: uat
......
---
spring.config.activate.on-profile: prod
.......
It seems cannot handle multi profile in same yml org.springframework.cloud.config.server.environment.AwsS3EnvironmentRepository
class YamlS3ConfigFile extends S3ConfigFile {
final InputStream inputStream;
YamlS3ConfigFile(String version, InputStream inputStream) {
super(version);
this.inputStream = inputStream;
}
@Override
public Properties read() {
final YamlPropertiesFactoryBean yaml = new YamlPropertiesFactoryBean();
try (InputStream in = inputStream) {
yaml.setResources(new InputStreamResource(in));
return yaml.getObject();
}
catch (IOException e) {
throw new IllegalStateException("Cannot load environment", e);
}
}
}
the yaml properties here using ConcurrentHashMap to store not sure if this is the design
Comment From: ryanjbaxter
Can you elaborate on what the request to the config server looks like, what data is in the S3 bucket that should be returned, what the response from the config server looks like, and what you expect that response to look like?
Comment From: spring-cloud-issues
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.
Comment From: spring-cloud-issues
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.