All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.transferwise.tasks.EnvironmentValidator Maven / Gradle / Ivy

There is a newer version: 1.43.0
Show newest version
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();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy