title: Using `@ConfigurationProperties` annotation on `@Bean` Method
body: <p>Could someone give a MWE of how to use the <code>@ConfigurationProperties</code> annotation directly on a <code>@Bean</code> method?</p>
  
  <p>I have seen countless examples of it being used on class definitions - but no examples yet for <code>@Bean</code> methods. </p>
  
  <p>To quote the <a href="https://docs.spring.io/spring-boot/docs/current/api/org/springframework/boot/context/properties/ConfigurationProperties.html" rel="noreferrer">documentation</a>:</p>
  
  <ul>
  <li>Add this to a class definition or <strong>a <code>@Bean</code> method</strong></li>
  <li>@Target(value={TYPE,<strong>METHOD</strong>})</li>
  </ul>
  
  <p>So, I think there is a possibility and an intended use as well - but unluckily I am unable to figure it out.</p>