title: Spring: How do I inject ENUM in Spring configuration?
body: <p>I have a <code>ENUM</code> as </p>
  
  <pre><code>package com.myorg.sparrow.s3Environment;
  
  import javax.annotation.Nonnull;
  
  public enum DocumentType {
      Document("document/", ".xml.gz", "binary/octet-stream", "gzip", true);
  
      private final String path;
      private final String suffix;
      private final String contentType;
      private final String contentEncoding;
      private final Boolean compress;
  
      private DocumentType(@Nonnull final String path, @Nonnull final String suffix,
                           @Nonnull final String contentType, @Nonnull final String contentEncoding,
                           @Nonnull final Boolean compress) {
          this.path = path;
          this.suffix = suffix;
          this.contentType = contentType;
          this.contentEncoding = contentEncoding;
          this.compress = compress;
      }
  
      @Nonnull
      public String getPath() {
          return path;
      }
  
      @Nonnull
      public String getSuffix() {
          return suffix;
      }
  
      @Nonnull
      public String getContentType() {
          return contentType;
      }
  
      @Nonnull
      public String getContentEncoding() {
          return contentEncoding;
      }
  
      @Nonnull
      public Boolean isCompress() {
          return compress;
      }
  }
  </code></pre>
  
  <p>I want to inject this value of <code>DocumentType.Document</code> in <code>Spring</code> configuration file</p>
  
  <pre class="lang-xml prettyprint-override"><code>   &lt;bean id="s3Service" class="com.myorg.sparrow.business.xml.persist.S3Service"&gt;
          &lt;constructor-arg ref="awsCredentials" /&gt;
          &lt;constructor-arg value="**DocumentType.DOCUMENT**" /&gt; // how do I inject it here?
          &lt;constructor-arg value="${com.myorg.sparrow.s3EnvironmentConfiguration.S3EnvironmentConfigurator-destBucketName}" /&gt;
      &lt;/bean&gt;
  </code></pre>
  
  <p>How do I inject this value in </p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;constructor-arg value="**DocumentType.DOCUMENT**" /&gt; // how do I inject it here?
  </code></pre>
  
  <p>I am very new to Spring framework and not sure how to achieve this</p>
  
  <p>Thank you</p>