I am working on a library that I want to have its own bootstrap.yaml to define some configurations. I already have a class that is used for user defined configurations in there bootstrap.yaml, but when I attempt to create another configuration class I am never able to get the values stored in my bootstrap.yaml, but it will take them from the users bootstrap.yaml.
How it looks:
Test Project
- src/main/resources/bootstrap.yaml <- Anything I put in here works
Library
- src/main/java/UserProperties <- Uses
@ConfigurationProperties
- src/main/java/MyProperties <- Uses
@ConfigurationProperties
with a different Prefix - src/main/resources/bootstrap.yaml <- Doesn't seem to do anything, but I want MyProperties to use this as a default.
I read somewhere that adding @PropertySource("classpath:bootstrap.yaml")
to a MyProperties should work, but had no luck.