io.github.manuelarte.spring.manuelartevalidation.validators.ExistsValidator Maven / Gradle / Ivy
The newest version!
package io.github.manuelarte.spring.manuelartevalidation.validators;
import io.github.manuelarte.spring.manuelartevalidation.constraints.Exists;
import java.util.List;
import java.util.Objects;
import java.util.stream.StreamSupport;
import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;
import javax.validation.constraints.NotNull;
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.context.annotation.Scope;
import org.springframework.core.ResolvableType;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Component;
@Component
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
@lombok.RequiredArgsConstructor
public class ExistsValidator implements ConstraintValidator {
@lombok.NonNull
private final List> repositories;
private CrudRepository
© 2015 - 2024 Weber Informatics LLC | Privacy Policy