• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java BeanNameAutoProxyCreator类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator的典型用法代码示例。如果您正苦于以下问题:Java BeanNameAutoProxyCreator类的具体用法?Java BeanNameAutoProxyCreator怎么用?Java BeanNameAutoProxyCreator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



BeanNameAutoProxyCreator类属于org.springframework.aop.framework.autoproxy包,在下文中一共展示了BeanNameAutoProxyCreator类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: customizeTransactionBeanNameAutoProxyCreator

import org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator; //导入依赖的package包/类
/**
 * 配置事务拦截
 * <p>
 * {@link #customizeTransactionInterceptor(PlatformTransactionManager)}
 */
@Bean
public BeanNameAutoProxyCreator customizeTransactionBeanNameAutoProxyCreator () {
	BeanNameAutoProxyCreator beanNameAutoProxyCreator = new BeanNameAutoProxyCreator();
	// 设置定制的事务拦截器
	beanNameAutoProxyCreator.setInterceptorNames( CUSTOMIZE_TRANSACTION_INTERCEPTOR_NAME );
	List< String > transactionBeanNames = new ArrayList<>( DEFAULT_TRANSACTION_BEAN_NAMES.length + customizeTransactionBeanNames.length );
	// 默认
	transactionBeanNames.addAll( Arrays.asList( DEFAULT_TRANSACTION_BEAN_NAMES ) );
	// 定制
	transactionBeanNames.addAll( Arrays.asList( customizeTransactionBeanNames ) );
	// 归集
	for ( String transactionBeanName : transactionBeanNames ) {
		beanNameAutoProxyCreator.setBeanNames( transactionBeanName );
	}
	beanNameAutoProxyCreator.setProxyTargetClass( true );
	return beanNameAutoProxyCreator;
}
 
开发者ID:yujunhao8831,项目名称:spring-boot-start-current,代码行数:23,代码来源:TransactionalConfig.java


示例2: txProxy

import org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator; //导入依赖的package包/类
@Bean
public BeanNameAutoProxyCreator txProxy(){
	 BeanNameAutoProxyCreator creator = new BeanNameAutoProxyCreator();
	 creator.setInterceptorNames("txAdvice");
	 creator.setBeanNames("*Service","*ServiceImpl");
	 creator.setProxyTargetClass(true);
	 return creator;
}
 
开发者ID:ranji1221,项目名称:lemcloud,代码行数:9,代码来源:TransactionConfig.java


示例3: nameProxyCreator

import org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator; //导入依赖的package包/类
@Bean
@ConfigurationProperties(DruidStatProperties.DRUID_STAT_PREFIX)
public BeanNameAutoProxyCreator nameProxyCreator(DruidStatProperties properties){
    if (properties.getBeanNames() == null){
        throw new IllegalStateException(DruidStatProperties.DRUID_STAT_PREFIX+".bean-names must  not null.");
    }
    BeanNameAutoProxyCreator creator = new BeanNameAutoProxyCreator();
    creator.setProxyTargetClass(proxyTargetClass);
    String[] beanNames = new String[properties.getBeanNames().size()];
    beanNames = properties.getBeanNames().toArray(beanNames);
    creator.setBeanNames(beanNames);
    creator.setInterceptorNames(DruidStatProperties.DRUID_STAT_INTERCEPTOR_NAME);
    return  creator;
}
 
开发者ID:cuisongliu,项目名称:druid-boot-starter,代码行数:15,代码来源:DruidNameAopAutoConfiguration.java


示例4: taskExecutionStatusServiceProxyCreator

import org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator; //导入依赖的package包/类
/**
 * Creates a proxy for the task execution status service that logs method invocation on the service.
 *
 * @return Task execution status service proxy creator.
 */
@Bean
public BeanNameAutoProxyCreator taskExecutionStatusServiceProxyCreator() {
    final BeanNameAutoProxyCreator theProxyCreator = new BeanNameAutoProxyCreator();
    final String[] theProxiedBeanNames = new String[1];
    theProxiedBeanNames[0] = "taskExecutionStatusService";
    theProxyCreator.setBeanNames(theProxiedBeanNames);

    final String[] theInterceptorNames = new String[1];
    theInterceptorNames[0] = "invocationLoggerInterceptor";
    theProxyCreator.setInterceptorNames(theInterceptorNames);

    return theProxyCreator;
}
 
开发者ID:krizsan,项目名称:message-cowboy,代码行数:19,代码来源:TaskExecutionStatusCleanupTestConfiguration.java


示例5: lazyInitAutoProxyCreator

import org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator; //导入依赖的package包/类
@Bean
public BeanNameAutoProxyCreator lazyInitAutoProxyCreator() {
	BeanNameAutoProxyCreator autoProxyCreator = new BeanNameAutoProxyCreator();
	autoProxyCreator.setCustomTargetSourceCreators(lazyInitTargetSourceCreator());
	return autoProxyCreator;
}
 
开发者ID:langtianya,项目名称:spring4-understanding,代码行数:7,代码来源:AutoProxyLazyInitTests.java



注:本文中的org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java RMNMInfo类代码示例发布时间:2022-05-22
下一篇:
Java TaskInputArgs类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap