springboot 乐观锁重试机制
重试机制针对乐观锁的重试机制我分成以下几个步骤来实现:自定义注解给注解添加aop切面,在around中添加业务处理;给serviceImpl添加注解自定义注解@Target({ElementType.METHOD,ElementType.TYPE})@Retention(RetentionPolicy.RUNTIME)@Documentedpublic @interface CustomRetry { //重试次数 ,这里默认15 int value() default
原创
2021-06-24 17:19:05 ·
1192 阅读 ·
1 评论