I have a bunch of spring application.yml properties file in S3 bucket for a different environment. I want to load the property files from the S3 bucket in order to guarantee a stateless configuration.
// Config Object
@Configuration
@ConfigurationProperties(prefix = "yaml")
public class YamlFooProperties {
private String name;
private List<String> aliases;
// standard getter and setters
}
// foo.yml file located in S3 bucket
yaml:
name: foo
aliases:
- abc
- xyz
How can get my spring-boot application to load those properties and make then available when the application starts?
I'm using spring-boot version 2.2.6.RELEASE and Java 11.