1
1
/*
2
- * Copyright 2002-2012 the original author or authors.
2
+ * Copyright 2002-2016 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
19
19
import org .springframework .beans .factory .BeanNameAware ;
20
20
21
21
/**
22
- * BeanPostProcessor implementation that creates AOP proxies based on all candidate
23
- * Advisors in the current BeanFactory. This class is completely generic; it contains
24
- * no special code to handle any particular aspects, such as pooling aspects.
22
+ * {@code BeanPostProcessor} implementation that creates AOP proxies based on all
23
+ * candidate {@code Advisor}s in the current {@code BeanFactory}. This class is
24
+ * completely generic; it contains no special code to handle any particular aspects,
25
+ * such as pooling aspects.
25
26
*
26
27
* <p>It's possible to filter out advisors - for example, to use multiple post processors
27
- * of this type in the same factory - by setting the {@code usePrefix} property
28
- * to true, in which case only advisors beginning with the DefaultAdvisorAutoProxyCreator's
29
- * bean name followed by a dot (like "aapc.") will be used. This default prefix can be
30
- * changed from the bean name by setting the {@code advisorBeanNamePrefix} property.
28
+ * of this type in the same factory - by setting the {@code usePrefix} property to true,
29
+ * in which case only advisors beginning with the DefaultAdvisorAutoProxyCreator's bean
30
+ * name followed by a dot (like "aapc.") will be used. This default prefix can be changed
31
+ * from the bean name by setting the {@code advisorBeanNamePrefix} property.
31
32
* The separator (.) will also be used in this case.
32
33
*
33
34
* @author Rod Johnson
@@ -40,22 +41,22 @@ public class DefaultAdvisorAutoProxyCreator extends AbstractAdvisorAutoProxyCrea
40
41
public final static String SEPARATOR = "." ;
41
42
42
43
43
- private boolean usePrefix ;
44
+ private boolean usePrefix = false ;
44
45
45
46
private String advisorBeanNamePrefix ;
46
47
47
48
48
49
/**
49
- * Set whether to exclude advisors with a certain prefix
50
- * in the bean name.
50
+ * Set whether to only include advisors with a certain prefix in the bean name.
51
+ * <p>Default is {@code false}, including all beans of type {@code Advisor}.
52
+ * @see #setAdvisorBeanNamePrefix
51
53
*/
52
54
public void setUsePrefix (boolean usePrefix ) {
53
55
this .usePrefix = usePrefix ;
54
56
}
55
57
56
58
/**
57
- * Return whether to exclude advisors with a certain prefix
58
- * in the bean name.
59
+ * Return whether to only include advisors with a certain prefix in the bean name.
59
60
*/
60
61
public boolean isUsePrefix () {
61
62
return this .usePrefix ;
@@ -89,7 +90,7 @@ public void setBeanName(String name) {
89
90
90
91
91
92
/**
92
- * Consider Advisor beans with the specified prefix as eligible, if activated.
93
+ * Consider {@code Advisor} beans with the specified prefix as eligible, if activated.
93
94
* @see #setUsePrefix
94
95
* @see #setAdvisorBeanNamePrefix
95
96
*/
0 commit comments