title: How to use @ConfigurationProperties with Records?
body: <p>Java 16 introduced <a href="https://openjdk.java.net/jeps/395" rel="noreferrer">Records</a>, which help to reduce boilerplate code when writing classes that carry immutable data. When I try to use a Record as <code>@ConfigurationProperties</code> bean as follows I get the following error message:</p>
  <pre><code>@ConfigurationProperties(&quot;demo&quot;)
  public record MyConfigurationProperties(
          String myProperty
  ) {
  }
  </code></pre>
  <pre><code>***************************
  APPLICATION FAILED TO START
  ***************************
  
  Description:
  
  Parameter 0 of constructor in com.example.demo.MyConfigurationProperties required a bean of type 'java.lang.String' that could not be found.
  </code></pre>
  <p>How can I use Records as <code>@ConfigurationProperties</code>?</p>