Polishing
This commit is contained in:
@@ -54,7 +54,7 @@ public abstract class AbstractAsyncConfiguration implements ImportAware {
|
||||
/**
|
||||
* Collect any {@link AsyncConfigurer} beans through autowiring.
|
||||
*/
|
||||
@Autowired(required = false)
|
||||
@Autowired(required=false)
|
||||
void setConfigurers(Collection<AsyncConfigurer> configurers) {
|
||||
if (CollectionUtils.isEmpty(configurers)) {
|
||||
return;
|
||||
@@ -65,4 +65,5 @@ public abstract class AbstractAsyncConfiguration implements ImportAware {
|
||||
AsyncConfigurer configurer = configurers.iterator().next();
|
||||
this.executor = configurer.getAsyncExecutor();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2013 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -42,21 +42,16 @@ public class ProxyAsyncConfiguration extends AbstractAsyncConfiguration {
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
public AsyncAnnotationBeanPostProcessor asyncAdvisor() {
|
||||
Assert.notNull(this.enableAsync, "@EnableAsync annotation metadata was not injected");
|
||||
|
||||
AsyncAnnotationBeanPostProcessor bpp = new AsyncAnnotationBeanPostProcessor();
|
||||
|
||||
Class<? extends Annotation> customAsyncAnnotation = enableAsync.getClass("annotation");
|
||||
if (customAsyncAnnotation != AnnotationUtils.getDefaultValue(EnableAsync.class, "annotation")) {
|
||||
bpp.setAsyncAnnotationType(customAsyncAnnotation);
|
||||
}
|
||||
|
||||
if (this.executor != null) {
|
||||
bpp.setExecutor(this.executor);
|
||||
}
|
||||
|
||||
bpp.setProxyTargetClass(this.enableAsync.getBoolean("proxyTargetClass"));
|
||||
bpp.setOrder(this.enableAsync.<Integer>getNumber("order"));
|
||||
|
||||
return bpp;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user