Update Javadoc for LazyInitTargetSourceCreator
See gh-24915
This commit is contained in:
@@ -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.
|
||||
*
|
||||
* <p>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
|
||||
* <p>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:
|
||||
*
|
||||
* <pre class="code">
|
||||
* <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></pre>
|
||||
*
|
||||
* @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
|
||||
|
||||
Reference in New Issue
Block a user