Post Processor Overview

- acting in the spring post processor of:

  Bean plays in post processor initialization and instantiation process pivotal role in addressing some of the annotations, bean set certain parameters, generate some dynamic proxy etc.

- Common post-processor (the BeanPostProcessor)

1, ApplicationContextAwareProcessor
  effect: Let bean implementation ApplicationContextAware obtained applicationContext (container context)
  (EnvironmentAware, EmbeddedValueResolverAware, The ResourceLoaderAware, ApplicationEventPublisherAware, the MessageSourceAware, ApplicationContextAware
  implement these interfaces are the bean post processor)
2, InitDestroyAnnotationBeanPostProcessor
. 3, InstantiationAwareBeanPostProcessor (Interface )
. 4, CommonAnnotationBeanPostProcessor
  CommonAnnotationBeanPostProcessor injection performed @Resource like annotation,
. 5, the AutowiredAnnotationBeanPostProcessor
  the AutowiredAnnotationBeanPostProcessor performed @Autowired annotation implantation
. 6, the RequiredAnnotationBeanPostProcessor
  the RequiredAnnotationBeanPostProcessor performed @ Required annotation
. 7, BeanValidationPostProcessor
. 8, AbstractAutoProxyCreator


----- difference instantiated and initialized to
1, ---- instantiate instances of a process to create process Bean, i.e. calling the constructor of Bean, Bean single example of embodiment into a single cell

2, the process of initializing ---- initialization process is an assignment that calls the setter Bean, Bean attributes set

BeanPostProcessor acting in previous process (2) before and after the current InstantiationAwareBeanPostProcessor acting on the process (1) back and forth;

Guess you like

Origin www.cnblogs.com/windy13/p/11986283.html