title: Use application.properties to initialize an object
body: <p>I use <code>@Autowired</code> in my spring boot application to initialize some properties.
  I know how i can initialize primitive datatypes but i don't know how to initialize objects.</p>
  
  <p>That's my <code>Component</code>:</p>
  
  <pre><code>@Component
  @ConfigurationProperties(prefix = "bitmovin.bitmovin")
  public class BitmovinConfig {
  
      private S3InputConfig S3InputConfig = new S3InputConfig();
      private int threadPoolSize;
      private ArrayList&lt;String&gt; testFiles;
  
      public BitmovinConfig() {
      }
  
      public S3InputConfig getS3InputConfig() {
          return S3InputConfig;
      }
  
      public void setS3InputConfig(S3InputConfig s3InputConfig) {
          S3InputConfig = s3InputConfig;
      }
  
      public int getThreadPoolSize() {
          return threadPoolSize;
      }
  
      public void setThreadPoolSize(int threadPoolSize) {
          this.threadPoolSize = threadPoolSize;
      }
  
      public ArrayList&lt;String&gt; getTestFiles() {
          return testFiles;
      }
  
      public void setTestFiles(ArrayList&lt;String&gt; testFiles) {
          this.testFiles = testFiles;
      }
  }
  </code></pre>
  
  <p>And that's my <code>application.properties</code>file:</p>
  
  <pre><code>bitmovin.bitmovin.threadPoolSize = 30
  bitmovin.bitmovin.S3InputConfig = ??
  bitmovin.bitmovin.testFiles= ??
  </code></pre>
  
  <p>How can i initialize an object or a list in <code>application.properties</code>?</p>
  
  <blockquote>
    <p><strong>UPDATE</strong></p>
  </blockquote>
  
  <p>The Object, which i didn't create myself, i want to initialize:</p>
  
  <pre><code>public class S3OutputConfig {
      @Expose
      public String name;
      @Expose
      public S3Region region;
      @Expose
      public String accessKey;
      @Expose
      public String secretKey;
      @Expose
      public String bucket;
      @Expose
      public String prefix;
      @Expose
      public boolean makePublic;
  }
  </code></pre>