title: Get application.yml infos in spring
body: <p>I have add some config inside my <code>application.yml</code> file and I want to read it from my Java code.</p>
  
  <p>The added node inside the YAML file looks like this:</p>
  
  <pre><code>myConfig:
      projectOne:
          mantisID: 501
          user: username
          password: passwd
      projectTwo:
          mantisID: 502
          user: username
          password: passwd
  </code></pre>
  
  <p>What I want is to get a List of Project objects where<br></p>
  
  <pre><code>Project.mantisID = 501,
  Project.user = "username",
  Project.password = "passwd",
  </code></pre>
  
  <p>etc...</p>
  
  <p>I know spring can read this file with some @Value annotation but how can I use this in order to get what I need?</p>