类org.springframework.context.event.test.EventCollector源码实例Demo

下面列出了怎么用org.springframework.context.event.test.EventCollector的API类实例代码及写法,或者点击链接到github查看源代码。

private void doLoad(Class<?>... classes) {
	AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(classes);
	this.eventCollector = ctx.getBean(EventCollector.class);
	this.countDownLatch = ctx.getBean(CountDownLatch.class);
	this.context = ctx;
}
 
private EventCollector getEventCollector(ConfigurableApplicationContext context) {
	return context.getBean(EventCollector.class);
}
 
@Bean
public EventCollector eventCollector() {
	return new EventCollector();
}
 
private void doLoad(Class<?>... classes) {
	AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(classes);
	this.eventCollector = ctx.getBean(EventCollector.class);
	this.countDownLatch = ctx.getBean(CountDownLatch.class);
	this.context = ctx;
}
 
private EventCollector getEventCollector(ConfigurableApplicationContext context) {
	return context.getBean(EventCollector.class);
}
 
@Bean
public EventCollector eventCollector() {
	return new EventCollector();
}
 
private void doLoad(Class<?>... classes) {
	AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(classes);
	this.eventCollector = ctx.getBean(EventCollector.class);
	this.countDownLatch = ctx.getBean(CountDownLatch.class);
	this.context = ctx;
}
 
private EventCollector getEventCollector(ConfigurableApplicationContext context) {
	return context.getBean(EventCollector.class);
}
 
@Bean
public EventCollector eventCollector() {
	return new EventCollector();
}
 
 类方法
 同包方法