接口的使用
org.springframework.aop.Advisor
使用Advisor的程序包 程序包 说明 org.springframework.aop Core Spring AOP interfaces, built on AOP Alliance AOP interoperability interfaces.org.springframework.aop.aspectj AspectJ integration package.org.springframework.aop.aspectj.annotation Classes enabling AspectJ 5 @Annotated classes to be used in Spring AOP.org.springframework.aop.aspectj.autoproxy Base classes enabling auto-proxying based on AspectJ.org.springframework.aop.framework Package containing Spring's basic AOP infrastructure, compliant with the AOP Alliance interfaces.org.springframework.aop.framework.adapter SPI package allowing Spring AOP framework to handle arbitrary advice types.org.springframework.aop.framework.autoproxy Bean post-processors for use in ApplicationContexts to simplify AOP usage by automatically creating AOP proxies without the need to use a ProxyFactoryBean.org.springframework.aop.interceptor Provides miscellaneous interceptor implementations.org.springframework.aop.support Convenience classes for using Spring's AOP API.org.springframework.cache.interceptor AOP-based solution for declarative caching demarcation.org.springframework.cache.jcache.interceptor AOP-based solution for declarative caching demarcation using JSR-107 annotations.org.springframework.dao.annotation Annotation support for DAOs.org.springframework.scheduling.annotation Java 5 annotation for asynchronous method execution.org.springframework.transaction.interceptor AOP-based solution for declarative transaction demarcation.org.springframework.aop中Advisor的使用
org.springframework.aop中Advisor的子接口 修饰符和类型 接口 说明 interfaceIntroductionAdvisorSuperinterface for advisors that perform one or more AOP introductions.interfacePointcutAdvisorSuperinterface for all Advisors that are driven by a pointcut.org.springframework.aop.aspectj中Advisor的使用
org.springframework.aop.aspectj中Advisor的子接口 修饰符和类型 接口 说明 interfaceInstantiationModelAwarePointcutAdvisorInterface to be implemented by Spring AOP Advisors wrapping AspectJ aspects that may have a lazy initialization strategy.实现Advisor的org.springframework.aop.aspectj中的类 修饰符和类型 类 说明 classAspectJExpressionPointcutAdvisorSpring AOP Advisor that can be used for any AspectJ pointcut expression.classAspectJPointcutAdvisorAspectJPointcutAdvisor that adapts anAbstractAspectJAdviceto thePointcutAdvisorinterface.classDeclareParentsAdvisorIntroduction advisor delegating to the given object.参数类型为Advisor的org.springframework.aop.aspectj中的方法 修饰符和类型 方法 说明 static AspectJPrecedenceInformationAspectJAopUtils. getAspectJPrecedenceInformationFor(Advisor anAdvisor)Return the AspectJPrecedenceInformation provided by this advisor or its advice.static booleanAspectJAopUtils. isAfterAdvice(Advisor anAdvisor)Returntrueif the advisor is a form of after advice.static booleanAspectJAopUtils. isBeforeAdvice(Advisor anAdvisor)Returntrueif the advisor is a form of before advice.类型变量类型为Advisor的org.springframework.aop.aspectj中的方法参数 修饰符和类型 方法 说明 static booleanAspectJProxyUtils. makeAdvisorChainAspectJCapableIfNecessary(List<Advisor> advisors)Add special advisors if necessary to work with a proxy chain that contains AspectJ advisors: concretely,ExposeInvocationInterceptorat the beginning of the list.org.springframework.aop.aspectj.annotation中Advisor的使用
实现Advisor的org.springframework.aop.aspectj.annotation中的类 修饰符和类型 类 说明 protected static classReflectiveAspectJAdvisorFactory.SyntheticInstantiationAdvisorSynthetic advisor that instantiates the aspect.返回Advisor的org.springframework.aop.aspectj.annotation中的方法 修饰符和类型 方法 说明 AdvisorAspectJAdvisorFactory. getAdvisor(Method candidateAdviceMethod, MetadataAwareAspectInstanceFactory aspectInstanceFactory, int declarationOrder, String aspectName)Build a Spring AOP Advisor for the given AspectJ advice method.AdvisorReflectiveAspectJAdvisorFactory. getAdvisor(Method candidateAdviceMethod, MetadataAwareAspectInstanceFactory aspectInstanceFactory, int declarationOrderInAspect, String aspectName)返回变量类型为Advisor的类型的org.springframework.aop.aspectj.annotation中的方法 修饰符和类型 方法 说明 List<Advisor>BeanFactoryAspectJAdvisorsBuilder. buildAspectJAdvisors()Look for AspectJ-annotated aspect beans in the current bean factory, and return to a list of Spring AOP Advisors representing them.protected List<Advisor>AnnotationAwareAspectJAutoProxyCreator. findCandidateAdvisors()List<Advisor>AspectJAdvisorFactory. getAdvisors(MetadataAwareAspectInstanceFactory aspectInstanceFactory)Build Spring AOP Advisors for all annotated At-AspectJ methods on the specified aspect instance.List<Advisor>ReflectiveAspectJAdvisorFactory. getAdvisors(MetadataAwareAspectInstanceFactory aspectInstanceFactory)org.springframework.aop.aspectj.autoproxy中Advisor的使用
返回变量类型为Advisor的类型的org.springframework.aop.aspectj.autoproxy中的方法 修饰符和类型 方法 说明 protected List<Advisor>AspectJAwareAdvisorAutoProxyCreator. sortAdvisors(List<Advisor> advisors)Sort the suppliedAdvisorinstances according to AspectJ precedence.类型变量类型为Advisor的org.springframework.aop.aspectj.autoproxy中的方法参数 修饰符和类型 方法 说明 protected voidAspectJAwareAdvisorAutoProxyCreator. extendAdvisors(List<Advisor> candidateAdvisors)Add anExposeInvocationInterceptorto the beginning of the advice chain.protected List<Advisor>AspectJAwareAdvisorAutoProxyCreator. sortAdvisors(List<Advisor> advisors)Sort the suppliedAdvisorinstances according to AspectJ precedence.org.springframework.aop.framework中Advisor的使用
声明为Advisor的org.springframework.aop.framework中的字段 修饰符和类型 字段 说明 protected AdvisorAbstractAdvisingBeanPostProcessor. advisor返回Advisor的org.springframework.aop.framework中的方法 修饰符和类型 方法 说明 Advisor[]Advised. getAdvisors()Return the advisors applying to this proxy.Advisor[]AdvisedSupport. getAdvisors()返回变量类型为Advisor的类型的org.springframework.aop.framework中的方法 修饰符和类型 方法 说明 protected List<Advisor>AdvisedSupport. getAdvisorsInternal()参数类型为Advisor的org.springframework.aop.framework中的方法 修饰符和类型 方法 说明 voidAdvised. addAdvisor(int pos, Advisor advisor)Add an Advisor at the specified position in the chain.voidAdvised. addAdvisor(Advisor advisor)Add an advisor at the end of the advisor chain.voidAdvisedSupport. addAdvisor(int pos, Advisor advisor)voidAdvisedSupport. addAdvisor(Advisor advisor)voidAdvisedSupport. addAdvisors(Advisor... advisors)Add all of the given advisors to this proxy configuration.intAdvised. indexOf(Advisor advisor)Return the index (from 0) of the given advisor, or -1 if no such advisor applies to this proxy.intAdvisedSupport. indexOf(Advisor advisor)booleanAdvised. removeAdvisor(Advisor advisor)Remove the given advisor.booleanAdvisedSupport. removeAdvisor(Advisor advisor)booleanAdvised. replaceAdvisor(Advisor a, Advisor b)Replace the given advisor.booleanAdvisedSupport. replaceAdvisor(Advisor a, Advisor b)类型变量类型为Advisor的org.springframework.aop.framework中的方法参数 修饰符和类型 方法 说明 voidAdvisedSupport. addAdvisors(Collection<Advisor> advisors)Add all of the given advisors to this proxy configuration.protected voidAdvisedSupport. copyConfigurationFrom(AdvisedSupport other, TargetSource targetSource, List<Advisor> advisors)Copy the AOP configuration from the given AdvisedSupport object, but allow substitution of a fresh TargetSource and a given interceptor chain.org.springframework.aop.framework.adapter中Advisor的使用
返回Advisor的org.springframework.aop.framework.adapter中的方法 修饰符和类型 方法 说明 AdvisorAdvisorAdapterRegistry. wrap(Object advice)Return anAdvisorwrapping the given advice.AdvisorDefaultAdvisorAdapterRegistry. wrap(Object adviceObject)参数类型为Advisor的org.springframework.aop.framework.adapter中的方法 修饰符和类型 方法 说明 MethodInterceptorAdvisorAdapter. getInterceptor(Advisor advisor)Return an AOP Alliance MethodInterceptor exposing the behavior of the given advice to an interception-based AOP framework.MethodInterceptor[]AdvisorAdapterRegistry. getInterceptors(Advisor advisor)Return an array of AOP Alliance MethodInterceptors to allow use of the given Advisor in an interception-based framework.MethodInterceptor[]DefaultAdvisorAdapterRegistry. getInterceptors(Advisor advisor)org.springframework.aop.framework.autoproxy中Advisor的使用
返回Advisor的org.springframework.aop.framework.autoproxy中的方法 修饰符和类型 方法 说明 protected Advisor[]AbstractAutoProxyCreator. buildAdvisors(String beanName, Object[] specificInterceptors)Determine the advisors for the given bean, including the specific interceptors as well as the common interceptor, all adapted to the Advisor interface.返回变量类型为Advisor的类型的org.springframework.aop.framework.autoproxy中的方法 修饰符和类型 方法 说明 List<Advisor>BeanFactoryAdvisorRetrievalHelper. findAdvisorBeans()Find all eligible Advisor beans in the current bean factory, ignoring FactoryBeans and excluding beans that are currently in creation.protected List<Advisor>AbstractAdvisorAutoProxyCreator. findAdvisorsThatCanApply(List<Advisor> candidateAdvisors, Class<?> beanClass, String beanName)Search the given candidate Advisors to find all Advisors that can apply to the specified bean.protected List<Advisor>AbstractAdvisorAutoProxyCreator. findCandidateAdvisors()Find all candidate Advisors to use in auto-proxying.protected List<Advisor>AbstractAdvisorAutoProxyCreator. findEligibleAdvisors(Class<?> beanClass, String beanName)Find all eligible Advisors for auto-proxying this class.protected List<Advisor>AbstractAdvisorAutoProxyCreator. sortAdvisors(List<Advisor> advisors)Sort advisors based on ordering.类型变量类型为Advisor的org.springframework.aop.framework.autoproxy中的方法参数 修饰符和类型 方法 说明 protected voidAbstractAdvisorAutoProxyCreator. extendAdvisors(List<Advisor> candidateAdvisors)Extension hook that subclasses can override to register additional Advisors, given the sorted Advisors obtained to date.protected List<Advisor>AbstractAdvisorAutoProxyCreator. findAdvisorsThatCanApply(List<Advisor> candidateAdvisors, Class<?> beanClass, String beanName)Search the given candidate Advisors to find all Advisors that can apply to the specified bean.protected List<Advisor>AbstractAdvisorAutoProxyCreator. sortAdvisors(List<Advisor> advisors)Sort advisors based on ordering.org.springframework.aop.interceptor中Advisor的使用
声明为Advisor的org.springframework.aop.interceptor中的字段 修饰符和类型 字段 说明 static AdvisorExposeInvocationInterceptor. ADVISORSingleton advisor for this class.返回Advisor的org.springframework.aop.interceptor中的方法 修饰符和类型 方法 说明 static AdvisorExposeBeanNameAdvisors. createAdvisorIntroducingNamedBean(String beanName)Create a new advisor that will expose the given bean name, introducing the NamedBean interface to make the bean name accessible without forcing the target object to be aware of this Spring IoC concept.static AdvisorExposeBeanNameAdvisors. createAdvisorWithoutIntroduction(String beanName)Create a new advisor that will expose the given bean name, with no introduction.org.springframework.aop.support中Advisor的使用
实现Advisor的org.springframework.aop.support中的类 修饰符和类型 类 说明 classAbstractBeanFactoryPointcutAdvisorAbstract BeanFactory-based PointcutAdvisor that allows for any Advice to be configured as reference to an Advice bean in a BeanFactory.classAbstractGenericPointcutAdvisorAbstract genericPointcutAdvisorthat allows for anyAdviceto be configured.classAbstractPointcutAdvisorAbstract base class forPointcutAdvisorimplementations.classDefaultBeanFactoryPointcutAdvisorConcrete BeanFactory-based PointcutAdvisor that allows for any Advice to be configured as reference to an Advice bean in the BeanFactory, as well as the Pointcut to be configured through a bean property.classDefaultIntroductionAdvisorSimpleIntroductionAdvisorimplementation that by default applies to any class.classDefaultPointcutAdvisorConvenient Pointcut-driven Advisor implementation.classNameMatchMethodPointcutAdvisorConvenient class for name-match method pointcuts that hold an Advice, making them an Advisor.classRegexpMethodPointcutAdvisorConvenient class for regexp method pointcuts that hold an Advice, making them anAdvisor.classStaticMethodMatcherPointcutAdvisorConvenient base class for Advisors that are also static pointcuts.返回变量类型为Advisor的类型的org.springframework.aop.support中的方法 修饰符和类型 方法 说明 static List<Advisor>AopUtils. findAdvisorsThatCanApply(List<Advisor> candidateAdvisors, Class<?> clazz)Determine the sublist of thecandidateAdvisorslist that is applicable to the given class.参数类型为Advisor的org.springframework.aop.support中的方法 修饰符和类型 方法 说明 static booleanAopUtils. canApply(Advisor advisor, Class<?> targetClass)Can the given advisor apply at all on the given class?static booleanAopUtils. canApply(Advisor advisor, Class<?> targetClass, boolean hasIntroductions)Can the given advisor apply at all on the given class?类型变量类型为Advisor的org.springframework.aop.support中的方法参数 修饰符和类型 方法 说明 static List<Advisor>AopUtils. findAdvisorsThatCanApply(List<Advisor> candidateAdvisors, Class<?> clazz)Determine the sublist of thecandidateAdvisorslist that is applicable to the given class.org.springframework.cache.interceptor中Advisor的使用
实现Advisor的org.springframework.cache.interceptor中的类 修饰符和类型 类 说明 classBeanFactoryCacheOperationSourceAdvisorAdvisor driven by aCacheOperationSource, used to include a cache advice bean for methods that are cacheable.org.springframework.cache.jcache.interceptor中Advisor的使用
实现Advisor的org.springframework.cache.jcache.interceptor中的类 修饰符和类型 类 说明 classBeanFactoryJCacheOperationSourceAdvisorAdvisor driven by aJCacheOperationSource, used to include a cache advice bean for methods that are cacheable.org.springframework.dao.annotation中Advisor的使用
实现Advisor的org.springframework.dao.annotation中的类 修饰符和类型 类 说明 classPersistenceExceptionTranslationAdvisorSpring AOP exception translation aspect for use at Repository or DAO layer level.org.springframework.scheduling.annotation中Advisor的使用
实现Advisor的org.springframework.scheduling.annotation中的类 修饰符和类型 类 说明 classAsyncAnnotationAdvisorAdvisor that activates asynchronous method execution through theAsyncannotation.org.springframework.transaction.interceptor中Advisor的使用
实现Advisor的org.springframework.transaction.interceptor中的类 修饰符和类型 类 说明 classBeanFactoryTransactionAttributeSourceAdvisorAdvisor driven by aTransactionAttributeSource, used to include a transaction advice bean for methods that are transactional.classTransactionAttributeSourceAdvisorAdvisor driven by aTransactionAttributeSource, used to include aTransactionInterceptoronly for methods that are transactional.