All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.aqiu202.starters.jpa.config.RetryConfiguration Maven / Gradle / Ivy

There is a newer version: 1.2.1
Show newest version
package com.github.aqiu202.starters.jpa.config;

import com.github.aqiu202.aop.pointcut.AnnotationPointcutAdvisor;
import com.github.aqiu202.starters.jpa.anno.Retry;
import com.github.aqiu202.starters.jpa.aop.RetryMethodInterceptor;
import org.springframework.aop.Advisor;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 
{@link RetryConfiguration}
* * @author aqiu 2020/12/13 20:26 **/ @Configuration(proxyBeanMethods = false) public class RetryConfiguration { public static final String RETRY_METHOD_INTERCEPTOR_BEAN_NAME = "retryMethodInterceptorBean"; @Bean(name = RETRY_METHOD_INTERCEPTOR_BEAN_NAME) @ConditionalOnMissingBean(name = RETRY_METHOD_INTERCEPTOR_BEAN_NAME) public Advisor retryMethodInterceptor() { return new AnnotationPointcutAdvisor<>(Retry.class, new RetryMethodInterceptor()); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy