001package cn.sticki.validator.spel.parse; 002 003import org.springframework.context.annotation.Import; 004 005import java.lang.annotation.*; 006 007/** 008 * 启用SpelValidatorBeanRegistrar,启用后可以在 spel-validator 的相关注解中引用 Spring Bean。 009 * <p> 010 * 例如: 011 * <pre> 012 * @SpelAssert(assertTrue = "@userService.getUserById(#this.userId) != null") 013 * private Integer userId; 014 * </pre> 015 * 016 * @author 阿杆 017 * @version 1.0 018 * @since 2024/5/4 019 */ 020@Documented 021@Target(ElementType.TYPE) 022@Retention(RetentionPolicy.RUNTIME) 023@Import(SpelValidatorBeanRegistrar.class) 024public @interface EnableSpelValidatorBeanRegistrar { 025}