title: Spring boot read array from YAML (properties) file
body: <p>This is my project structure</p>
  
  <pre><code>- src
      - main
          - java
              - mypackage
              - resources
                  - config
                      application.yml
  </code></pre>
  
  <p>and i have this in application.yml</p>
  
  <pre><code>document:
      templates:
          filetypes:
              - elem1
              - elem2
              - elem3
              - elem4
      hello:
          test: "hello"
  </code></pre>
  
  <p>in my Endpoint i have the following</p>
  
  <pre><code>@Value("${document.templates.filetypes}")
  List&lt;String&gt; templatesFileTypes;
  
  @Value("${document.hello.test}")
  String hello;
  </code></pre>
  
  <p>in any function i can access something like <code>System.out.println(hello)</code>  and its perfectly working
  but for the fileTypes its not even compiling and i receive this error :</p>
  
  <blockquote>
    <p>Error creating bean with name 'configurationEndPoint': Injection of
    autowired dependencies failed; nested exception is
    java.lang.IllegalArgumentException: Could not resolve placeholder
    'document.templates.filetypes' in value
    "${document.templates.filetypes}"</p>
  </blockquote>
  
  <p>Searched alot and every solution i could find was that pointing to the write application.yml/application.xml file, which is invalid in my case since i can read the other test String but not the array;</p>
  
  <p>i tried <code>String[]</code> i tried <code>ArrayList&lt;String&gt;</code> but i can't get it to work</p>