org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator Java Examples

The following examples show how to use org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AutoloadCacheAutoConfigure.java    From AutoLoadCache with Apache License 2.0 5 votes vote down vote up
@Bean
@ConditionalOnBean(CacheHandler.class)
public AbstractAdvisorAutoProxyCreator autoloadCacheAutoProxyCreator() {
    DefaultAdvisorAutoProxyCreator proxy = new DefaultAdvisorAutoProxyCreator();
    proxy.setAdvisorBeanNamePrefix("autoloadCache");
    proxy.setProxyTargetClass(config.isProxyTargetClass());
    // proxy.setInterceptorNames("cacheAdvisor","cacheDeleteAdvisor","cacheDeleteTransactionalAdvisor");//
    // 注意此处不需要设置,否则会执行两次
    return proxy;
}