title: Reading from yaml is showing null values
body: <p>To read from yaml file i am doing the following </p>
  
  <pre><code>@Configuration
  @EnableConfigurationProperties
  @ConfigurationProperties("partners")
  public class YAMLConfig {
  
      private Map&lt;String,String&gt; partners = new HashMap&lt;&gt;();
  
      public void setPartners(Map&lt;String, String&gt; partners) {
          this.partners = partners;
      }
  
      public Map&lt;String, String&gt; getPartners() {
          return partners;
      }
  }
  </code></pre>
  
  <p>yaml file </p>
  
  <pre><code>person2:
    name: bbb
    addresses:
      to: jiang
      bit: su
  partners:
    p1: wallet
    p2: wallet
    p3: wallet
  </code></pre>
  
  <p>And in other Java file i am Autowiring to get YamlConfig above </p>
  
  <pre><code>@Service
  public class ObjectModificationService {
  
      @Autowired
      YAMLConfig yamlConfig;
  
      public  JSONObject modify(JSONObject jsonObject ) {
          String type  = yamlConfig.getPartners().get(partnerName.toLowerCase());
      }
  }
  </code></pre>
  
  <p>I am not getting any type above , also checked yamlConfig.getPartners() in debug it is coming as null. I was following this tutorial: <a href="https://www.baeldung.com/spring-yaml" rel="nofollow noreferrer">https://www.baeldung.com/spring-yaml</a>, but then again IDE is showing error when i put ConfigurationProperties without ConfigurationProperties("partners").</p>