How to validate that date in future in reference to another date?
You're gonna have to bear down and write yourself a Validator.
This should get you started:
Cross field validation with Hibernate Validator (JSR 303)
You should not use Annotations for cross field validation, write a validating function instead. Explained in this Answer to the Question, Cross field validation with Hibernate Validator (JSR 303).
For example write a validator function like this:
public class IncomingData {
@FutureOrPresent
private Instant startTime;
@Future
private Instant endTime;
public Boolean validate() {
return startTime.isBefore(endTime);
}
}
Then simply call the validator function when first receiving the data:
if (Boolean.FALSE.equals(incomingData.validate())) {
response = ResponseEntity.status(422).body(UNPROCESSABLE);
}