com.github.codeinghelper.annotation.validator.NotNullValidator Maven / Gradle / Ivy
package com.github.codeinghelper.annotation.validator;
import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;
/**
* @BelongsProject: test
* @BelongsPackage: com.example.demo.validator
* @Author: lizeze
* @CreateTime: 2020-08-04 22:07
* @Description: ${Description}
*/
public class NotNullValidator implements ConstraintValidator {
@Override
public void initialize(NotNull notNull) {
}
@Override
public boolean isValid(Object o, ConstraintValidatorContext constraintValidatorContext) {
return null != o;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy