title: using annotationConfigApplicationContext.getBeansOfType(Item.class) to get all ollect all Spring configured Item beans
body: <p>Hi i have a class called </p>
  
  <pre><code>public class Item {
  String name;
  String value;
  </code></pre>
  
  <p>}</p>
  
  <p>trying to get all the configured items from my yml file into a map like this </p>
  
  <pre><code>    @Override
  public void run(String... args) throws Exception {
      AnnotationConfigApplicationContext annotationConfigApplicationContext = new AnnotationConfigApplicationContext();
      Map&lt;String , Item&gt; items = annotationConfigApplicationContext.getBeansOfType(Item.class);
      System.out.println("Hello world" + items);
  
  }
  </code></pre>
  
  <p>I am new to sping and I don't know how my yml/JSON file look like</p>
  
  <p>should it be something similar to this  </p>
  
  <pre><code>item
    name:hello
    value:asdsad
  
  item
    name:abc
    value:asa
  </code></pre>
  
  <p>should i have any additional configuration as well? </p>