Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import org.springframework.format.annotation.DateTimeFormat;
- import javax.validation.constraints.NotNull;
- import java.util.Date;
- public class HourTracker {
- @NotNull(message = "start time cannot be null")
- @DateTimeFormat(pattern = "hh:mma")
- private Date startTime;
- @NotNull(message = "end time cannot be null")
- @DateTimeFormat(pattern = "hh:mma")
- private Date endTime;
- //getters and setters
- }
Add Comment
Please, Sign In to add comment