com.transferwise.tasks.EnvironmentValidator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tw-tasks-core Show documentation
Show all versions of tw-tasks-core Show documentation
Transferwise Tasks Executor - Fire and forget until Alert.
package com.transferwise.tasks;
import jakarta.validation.ConstraintViolationException;
import jakarta.validation.Validator;
import org.springframework.beans.factory.annotation.Autowired;
public class EnvironmentValidator extends BaseEnvironmentValidator {
@Autowired
private Validator validator;
@Override
public void validate() {
var violations = validator.validate(tasksProperties);
if (!violations.isEmpty()) {
throw new ConstraintViolationException(violations);
}
super.validate();
}
}