The original time value stored in my cassandra DB is : 11:43:00.000000000
I am trying to fetch it in my JSON response as : 11:43:00
What I am getting is: 11:43
What I have tried so far in my model class:
import java.time.LocalTime;
@Getter @Setter @RequiredArgsConstructor @AllArgsConstructor
public class Test {
...
@JsonFormat(pattern="HH:mm:ss")
private LocalTime delgtexpytm;
AND
@JsonFormat(pattern="KK:mm:ss")
private LocalTime delgtexpytm;
But both of them are trimming the trailing 00.
Untested
Try to override the
shapeproperty toSTRINGto specify the JSON type to be used. I guess it should help as long as the following explanation from the JavaDoc for theshape: