当前位置: 首页>>代码示例>>Java>>正文


Java AsyncConfigurer类代码示例

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


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

示例1: postProcessAfterInitialization

import org.springframework.scheduling.annotation.AsyncConfigurer; //导入依赖的package包/类
@Override
public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
  if (bean instanceof AsyncConfigurer) {
    AsyncConfigurer configurer = (AsyncConfigurer) bean;
    return new TracedAsyncConfigurer(tracer, configurer);
  }
  return bean;
}
 
开发者ID:opentracing-contrib,项目名称:java-spring-cloud,代码行数:9,代码来源:CustomAsyncConfigurerAutoConfiguration.java

示例2: should_return_async_configurer_when_bean_instance_of_it

import org.springframework.scheduling.annotation.AsyncConfigurer; //导入依赖的package包/类
@Test
public void should_return_async_configurer_when_bean_instance_of_it() {
  CustomAsyncConfigurerAutoConfiguration configuration = new CustomAsyncConfigurerAutoConfiguration();
  Object bean = configuration
      .postProcessAfterInitialization(mock(AsyncConfigurer.class), "myAsync");
  then(bean).isInstanceOf(TracedAsyncConfigurer.class);
}
 
开发者ID:opentracing-contrib,项目名称:java-spring-cloud,代码行数:8,代码来源:CustomAsyncConfigurerAutoConfigurationTest.java

示例3: postProcessAfterInitialization

import org.springframework.scheduling.annotation.AsyncConfigurer; //导入依赖的package包/类
@Override
public Object postProcessAfterInitialization(Object bean, String beanName)
		throws BeansException {
	if (bean instanceof AsyncConfigurer) {
		AsyncConfigurer configurer = (AsyncConfigurer) bean;
		return new LazyTraceAsyncCustomizer(this.beanFactory, configurer);
	}
	return bean;
}
 
开发者ID:reshmik,项目名称:Zipkin,代码行数:10,代码来源:AsyncCustomAutoConfiguration.java

示例4: should_return_lazy_async_configurer_when_bean_is_async_configurer

import org.springframework.scheduling.annotation.AsyncConfigurer; //导入依赖的package包/类
@Test
public void should_return_lazy_async_configurer_when_bean_is_async_configurer() throws Exception {
	AsyncCustomAutoConfiguration configuration = new AsyncCustomAutoConfiguration();

	Object bean = configuration
			.postProcessAfterInitialization(mock(AsyncConfigurer.class), "someName");

	then(bean).isInstanceOf(LazyTraceAsyncCustomizer.class);
}
 
开发者ID:reshmik,项目名称:Zipkin,代码行数:10,代码来源:AsyncCustomAutoConfigurationTest.java

示例5: TracedAsyncConfigurer

import org.springframework.scheduling.annotation.AsyncConfigurer; //导入依赖的package包/类
public TracedAsyncConfigurer(Tracer tracer, AsyncConfigurer delegate) {
  this.tracer = tracer;
  this.delegate = delegate;
}
 
开发者ID:opentracing-contrib,项目名称:java-spring-cloud,代码行数:5,代码来源:TracedAsyncConfigurer.java

示例6: LazyTraceAsyncCustomizer

import org.springframework.scheduling.annotation.AsyncConfigurer; //导入依赖的package包/类
public LazyTraceAsyncCustomizer(BeanFactory beanFactory, AsyncConfigurer delegate) {
	this.beanFactory = beanFactory;
	this.delegate = delegate;
}
 
开发者ID:reshmik,项目名称:Zipkin,代码行数:5,代码来源:LazyTraceAsyncCustomizer.java


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