package com.tailbet.util; import java.lang.annotation.*; /** * Redis分布式锁注解 */ @Target(ElementType.METHOD) @Retention(RetentionPolicy.RUNTIME) @Documented public @interface RedisLock { /** * 锁的key,支持SpEL表达式 */ String key(); /** * 锁过期时间(秒) */ int expire() default 30; /** * 是否等待锁 */ boolean waitLock() default false; /** * 等待锁的最大时间(毫秒) */ long waitTime() default 3000; }