类 ApplicationObjectSupport

  • 所有已实现的接口:
    Aware, ApplicationContextAware
    直接已知子类:
    AbstractHandlerMapping, WebApplicationObjectSupport

    public abstract class ApplicationObjectSupport
    extends Object
    implements ApplicationContextAware
    Convenient superclass for application objects that want to be aware of the application context, e.g. for custom lookup of collaborating beans or for context-specific resource access. It saves the application context reference and provides an initialization callback method. Furthermore, it offers numerous convenience methods for message lookup.

    There is no requirement to subclass this class: It just makes things a little easier if you need access to the context, e.g. for access to file resources or to the message source. Note that many application objects do not need to be aware of the application context at all, as they can receive collaborating beans via bean references.

    Many framework classes are derived from this class, particularly within the web support.

    作者:
    Rod Johnson, Juergen Hoeller
    另请参阅:
    WebApplicationObjectSupport