接口 SmartInitializingSingleton

    • 方法概要

      所有方法 实例方法 抽象方法 
      修饰符和类型方法说明
      voidafterSingletonsInstantiated()
      Invoked right at the end of the singleton pre-instantiation phase, with a guarantee that all regular singleton beans have been created already.
    • 方法详细资料

      • afterSingletonsInstantiated

        void afterSingletonsInstantiated()
        Invoked right at the end of the singleton pre-instantiation phase, with a guarantee that all regular singleton beans have been created already. ListableBeanFactory.getBeansOfType(java.lang.Class<T>) calls within this method won't trigger accidental side effects during bootstrap.

        NOTE: This callback won't be triggered for singleton beans lazily initialized on demand after BeanFactory bootstrap, and not for any other bean scope either. Carefully use it for beans with the intended bootstrap semantics only.