title: [Failed to convert property value of type 'java.lang.String' to required type 'java.sql.Time'
body: <p>I have a error when I try to send a form to my controller, I have this error: </p>
  
  <blockquote>
    <p>[Failed to convert property value of type 'java.lang.String' to
    required type 'java.sql.Time' 'horaire' on field 'heureDebut':
    rejected value [10:00]; codes
    [typeMismatch.horaire.heureDebut,typeMismatch.heureDebut,typeMismatch.java.sql.Time,typeMismatch]</p>
  </blockquote>
  
  <p>This is my Entity: </p>
  
  <pre><code>@Entity(name = "horaire")
  public class Horaire {
  
      @Id @GeneratedValue
      @Column(name = "idhoraire")
      private Integer id;
      @Column(name = "heure_debut")
      private Time heureDebut;
      @Column(name = "heure_fin")
      private Time heureFin;
  
  
      public Horaire() {
      }
  
      public Integer getId() {
          return id;
      }
  
      public void setId(Integer id) {
          this.id = id;
      }
  
      public Time getHeureDebut() {
          return heureDebut;
      }
  
      public void setHeureDebut(Time heureDebut) {
          this.heureDebut = heureDebut;
      }
  
      public Time getHeureFin() {
          return heureFin;
      }
  
      public void setHeureFin(Time heureFin) {
          this.heureFin = heureFin;
      }
  
      @Override
      public String toString() {
          return "Horaire{" +
                  "id=" + id +
                  ", heureDebut=" + heureDebut +
                  ", heureFin=" + heureFin +
                  '}';
      }
  }
  </code></pre>
  
  <p>This is my method in the controller:</p>
  
  <pre><code>@GetMapping("/save")
  public String saveHoraire(@Valid Horaire horaire) {
  
      horaireRepository.save(horaire);
  
      return "redirect:listeHoraire";
  
  }
  </code></pre>
  
  <p>this is my template:</p>
  
  <pre><code>&lt;form th:action="@{save}" method="get"  th:object="${horaire}"&gt;
      &lt;input type="text"  th:field="*{id}"&gt;
      &lt;input type="time"  th:field="*{heureDebut}"&gt;
      &lt;input type="time"  th:field="*{heureFin}"&gt;
      &lt;input type="submit" value="valider"/&gt;
  &lt;/form&gt;
  </code></pre>