|
1 | 1 | /*
|
2 |
| - * Copyright 2002-2014 the original author or authors. |
| 2 | + * Copyright 2002-2020 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.
|
|
23 | 23 | import org.springframework.lang.Nullable;
|
24 | 24 |
|
25 | 25 | /**
|
26 |
| - * TargetSourceCreator that enforces a LazyInitTargetSource for each bean |
27 |
| - * that is defined as "lazy-init". This will lead to a proxy created for |
28 |
| - * each of those beans, allowing to fetch a reference to such a bean |
29 |
| - * without actually initializing the target bean instance. |
| 26 | + * {@code TargetSourceCreator} that enforces a {@link LazyInitTargetSource} for |
| 27 | + * each bean that is defined as "lazy-init". This will lead to a proxy created for |
| 28 | + * each of those beans, allowing to fetch a reference to such a bean without |
| 29 | + * actually initializing the target bean instance. |
30 | 30 | *
|
31 |
| - * <p>To be registered as custom TargetSourceCreator for an auto-proxy creator, |
32 |
| - * in combination with custom interceptors for specific beans or for the |
33 |
| - * creation of lazy-init proxies only. For example, as autodetected |
| 31 | + * <p>To be registered as custom {@code TargetSourceCreator} for an auto-proxy |
| 32 | + * creator, in combination with custom interceptors for specific beans or for the |
| 33 | + * creation of lazy-init proxies only. For example, as an autodetected |
34 | 34 | * infrastructure bean in an XML application context definition:
|
35 | 35 | *
|
36 | 36 | * <pre class="code">
|
37 | 37 | * <bean class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">
|
| 38 | + * <property name="beanNames" value="*" /> <!-- apply to all beans --> |
38 | 39 | * <property name="customTargetSourceCreators">
|
39 | 40 | * <list>
|
40 |
| - * <bean class="org.springframework.aop.framework.autoproxy.target.LazyInitTargetSourceCreator"/> |
| 41 | + * <bean class="org.springframework.aop.framework.autoproxy.target.LazyInitTargetSourceCreator" /> |
41 | 42 | * </list>
|
42 | 43 | * </property>
|
43 | 44 | * </bean>
|
44 | 45 | *
|
45 | 46 | * <bean id="myLazyInitBean" class="mypackage.MyBeanClass" lazy-init="true">
|
46 |
| - * ... |
| 47 | + * <!-- ... --> |
47 | 48 | * </bean></pre>
|
48 | 49 | *
|
49 | 50 | * @author Juergen Hoeller
|
| 51 | + * @author Sam Brannen |
50 | 52 | * @since 1.2
|
51 | 53 | * @see org.springframework.beans.factory.config.BeanDefinition#isLazyInit
|
52 | 54 | * @see org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator#setCustomTargetSourceCreators
|
|
0 commit comments