In my Request DTO when I am trying to use pattern HHmm it's not working but HH:mm works.
public class RequestDTO {
@DateTimeFormat(pattern = "HHmm")
private LocalTime companyOfficeHoursStart;
}
Below is my MockMVC test:
String requestPayload = "{\"companyOfficeHoursStart\":\"1920\"}";
RequestBuilder operation = post("/bookings").content(requestPayload)
.contentType(MediaType.APPLICATION_JSON_VALUE).accept(MediaType.APPLICATION_JSON_VALUE);
How can we use HHmm format ?