From e8335c94d5e7ab57b2b43dd6b809c81c1e997fbd Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Tue, 12 May 2020 12:53:35 +0200 Subject: [PATCH] Update Javadoc for LazyInitTargetSourceCreator See gh-24915 --- .../target/LazyInitTargetSourceCreator.java | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/target/LazyInitTargetSourceCreator.java b/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/target/LazyInitTargetSourceCreator.java index 5761068e8a..01aa62b760 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/target/LazyInitTargetSourceCreator.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/target/LazyInitTargetSourceCreator.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2014 the original author or authors. + * Copyright 2002-2020 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. @@ -23,30 +23,32 @@ import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import org.springframework.lang.Nullable; /** - * TargetSourceCreator that enforces a LazyInitTargetSource for each bean - * that is defined as "lazy-init". This will lead to a proxy created for - * each of those beans, allowing to fetch a reference to such a bean - * without actually initializing the target bean instance. + * {@code TargetSourceCreator} that enforces a {@link LazyInitTargetSource} for + * each bean that is defined as "lazy-init". This will lead to a proxy created for + * each of those beans, allowing to fetch a reference to such a bean without + * actually initializing the target bean instance. * - *

To be registered as custom TargetSourceCreator for an auto-proxy creator, - * in combination with custom interceptors for specific beans or for the - * creation of lazy-init proxies only. For example, as autodetected + *

To be registered as custom {@code TargetSourceCreator} for an auto-proxy + * creator, in combination with custom interceptors for specific beans or for the + * creation of lazy-init proxies only. For example, as an autodetected * infrastructure bean in an XML application context definition: * *

  * <bean class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">
+ *   <property name="beanNames" value="*" /> <!-- apply to all beans -->
  *   <property name="customTargetSourceCreators">
  *     <list>
- *       <bean class="org.springframework.aop.framework.autoproxy.target.LazyInitTargetSourceCreator"/>
+ *       <bean class="org.springframework.aop.framework.autoproxy.target.LazyInitTargetSourceCreator" />
  *     </list>
  *   </property>
  * </bean>
  *
  * <bean id="myLazyInitBean" class="mypackage.MyBeanClass" lazy-init="true">
- *   ...
+ *   <!-- ... -->
  * </bean>
* * @author Juergen Hoeller + * @author Sam Brannen * @since 1.2 * @see org.springframework.beans.factory.config.BeanDefinition#isLazyInit * @see org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator#setCustomTargetSourceCreators