spring-framework / org.springframework.aop.target / AbstractLazyCreationTargetSource / <init>

<init>

AbstractLazyCreationTargetSource()

org.springframework.aop.TargetSource implementation that will lazily create a user-managed object.

Creation of the lazy target object is controlled by the user by implementing the #createObject() method. This TargetSource will invoke this method the first time the proxy is accessed.

Useful when you need to pass a reference to some dependency to an object but you don't actually want the dependency to be created until it is first used. A typical scenario for this is a connection to a remote resource.

Author
Rob Harrop

Author
Juergen Hoeller

Since
1.2.4

See Also
#isInitialized()#createObject()