类 AbstractLazyCreationTargetSource

  • 所有已实现的接口:
    TargetClassAware, TargetSource

    public abstract class AbstractLazyCreationTargetSource
    extends Object
    implements TargetSource
    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.

    从以下版本开始:
    1.2.4
    作者:
    Rob Harrop, Juergen Hoeller
    另请参阅:
    isInitialized(), createObject()