title: Spring Data JPA not using AttributeConverter in Spring Boot Application
body: <p>I have a spring boot application that designates an <code>AttributeConverter</code> for an entity that converts an enum from uppercase to title case for storage in the database.</p>
  
  <p>I have the following entity:</p>
  
  <pre><code>@Entity
  @Table(name = "customerleads")
  @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
  public class CustomerLead implements Serializable {
  
      @Id
      @GeneratedValue(strategy = GenerationType.IDENTITY)
      private Long id;
  
      @Enumerated(EnumType.STRING)
      @Column(name = "type")
      @Convert(converter = CustomerLeadTypeConverter.class)
      private CustomerLeadType type = CustomerLeadType.OPEN;
  }
  </code></pre>
  
  <p>And the following AttributeConverter class:</p>
  
  <pre><code>@Converter(autoApply = true)
  public class CustomerLeadTypeConverter implements AttributeConverter&lt;CustomerLeadType, String&gt; {
  
      @Override
      public String convertToDatabaseColumn(CustomerLeadType attribute) {
          switch (attribute) {
              case OPEN:
                  return "Open";
              case CLOSED:
                  return "Closed";
              case DELETED:
                  return "Deleted";
              default:
                  throw new IllegalArgumentException("Unknown" + attribute);
          }
      }
  
      @Override
      public CustomerLeadType convertToEntityAttribute(String dbData) {
          switch (dbData) {
              case "Open":
                  return OPEN;
              case "Closed":
                  return CLOSED;
              case "Deleted":
                  return DELETED;
              default:
                  throw new IllegalArgumentException("Unknown" + dbData);
          }
      }
  }
  </code></pre>
  
  <p>Neither <code>@Converter(autoApply = true)</code> nor the <code>@Convert(converter = CustomerLeadTypeConverter.class)</code> seem to trigger the conversion.</p>