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