一:含义作用

==>BeanPostProcessor接口是众多Spring提供给开发者的bean生命周期内自定义逻辑拓展接口中的一个

 

二:接口定义

package org.springframework.beans.factory.config;

import org.springframework.beans.BeansException;

public interface BeanPostProcessor {

    /**
     *IOC容器中的bean实例化之前执行
     */
    Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException;

    /**
     *IOC容器中的bean实例化之后执行
     */
    Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException;

}
View Code

相关文章:

  • 2021-11-23
  • 2021-09-24
  • 2021-09-27
  • 2021-06-03
  • 2021-07-12
  • 2022-12-23
  • 2022-01-28
  • 2021-08-13
猜你喜欢
  • 2021-11-30
  • 2021-12-28
  • 2021-09-10
  • 2021-08-20
  • 2022-12-23
  • 2021-06-19
  • 2021-09-22
相关资源
相似解决方案