I am trying to load an array of strings from the application.yml
file. This is the config:
ignore:
filenames:
- .DS_Store
- .hg
This is the class fragment:
@Value("${ignore.filenames}")
private List<String> igonoredFileNames = new ArrayList<>();
There are other configurations in the same class that loads just fine. There are no tabs in my YAML file. Still, I get the following exception:
Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 'ignore.filenames' in string value "${ignore.filenames}"