I'm trying to make a query via GET by passing parameter id, date, and time. If I pass ID and Date, it works, but when I pass the time, I get a return error.
Field error in object 'tagsHourFilter' on field 'starttime': rejected value [22:27:02]; codes [typeMismatch.tagsHourFilter.hostInitial, typeMismatch.hostInitial, typeMismatch.java.time.LocalTime, typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [tagsHourFilter.host, InitialHand]; arguments []; default message; default message [Failed to convert property value of type 'java.lang.String' to required type 'java.time.LocalTime' for property 'initialTime'; nested exception is org.springframework.core.convert.ConversionFailedException: Failed to convert from type [java.lang.String] to type [@ com.fasterxml.jackson.annotation.JsonFormat @ org.springframework.format.annotation.DateTimeFormat java. time.LocalTime] for value '22: 27: 02'; nested exception is java.lang.IllegalArgumentException: Parse attempt failed for value [22:27:02]]
GET Query: localhost: 8080 / launch / search? ids = 1.3 & start data = 2018-10-01 & dataFinal = 2018-10-03 & start time = 22: 27: 02
Filter class:
@JsonFormat(pattern = "hh:mm:ss")
@DateTimeFormat(pattern = "hh:mm:ss")
private LocalTime horaInicial;