title: Handling Java 8 LocalDate with Kafka Avro serializer and auto-generation
body: <p>FYI: Spring Boot 2.2.4.RELEASE, Spring Cloud Hoxton.SR1, Confluent Docker platform 5.4.0 with the according Kafka Avro serializer, Spring Cloud Stream Schema 2.2.1.RELEASE (avro 1.9.1)
  Starting there : <a href="https://www.baeldung.com/spring-cloud-stream-kafka-avro-confluent" rel="nofollow noreferrer">https://www.baeldung.com/spring-cloud-stream-kafka-avro-confluent</a></p>
  
  <p>Using ConfluentSchemaRegistryClient but being unable to load local avro schema files, don't know why, I've been trying to use Spring's spring.cloud.stream.schema.avro.<strong>dynamicSchemaGenerationEnabled</strong> property with true.
  Message converter is activated with spring.cloud.stream.bindings.output/input.contentType=application/*+avro</p>
  
  <p>My first issue was that nullable values couldn't be supported, so I've been wondering myself <strong>how to indicate when fields are nullable when auto-generating schemas</strong> (this is an issue on producers' side). After having dealt with it by setting non null values into my information system :-( I encountered another issue with LocalDate fields, since <strong>LocalDate does not have a default constructor</strong> so deserialization fails (that is an issue on consumers' side).</p>
  
  <p>So I migrated my program to use Joda Time instead, but got the same issue as its LocalDate class is embedding a Chronology field which hasn't got a default constructor neither...</p>
  
  <p>So, my question is: can I use some kind of converters in order to achieve an end-to-end communication containing Java 8 Local Dates with Avro? I read that Avro 1.9 was supposed to support them (<a href="https://issues.apache.org/jira/browse/AVRO-2079" rel="nofollow noreferrer">https://issues.apache.org/jira/browse/AVRO-2079</a>), anyway. So I may be doing things wrong, but my Avro schema by hand quite looks like the one generated (but without nullable types, though).</p>
  
  <p>Thanks</p>