nerdexam
Broadcom-VMware

2V0-72.22PSE · Question #54

Which two statements are true concerning the BeanPostProcessor Extension point? (Choose two.)

The correct answer is B. Custom BeanPostProcessors can be implemented for Spring applications. D. BeanPostProcessors are called during the initialization phase of a bean life cycle. B and D are correct because BeanPostProcessor is a standard Spring extension point that developers can implement in custom classes (B), and it operates specifically during the initialization phase of the bean lifecycle - invoked both before (postProcessBeforeInitialization) and…

Core Spring

Question

Which two statements are true concerning the BeanPostProcessor Extension point? (Choose two.)

Options

  • ABeanPostProcessors are called before the dependencies have been injected.
  • BCustom BeanPostProcessors can be implemented for Spring applications.
  • CBeanPostProcessors are called before the BeanFactoryPostProcessors.
  • DBeanPostProcessors are called during the initialization phase of a bean life cycle.
  • EBeanPostProcessors cannot be ordered in a Spring Boot application.

How the community answered

(29 responses)
  • A
    3% (1)
  • B
    72% (21)
  • C
    10% (3)
  • E
    14% (4)

Explanation

B and D are correct because BeanPostProcessor is a standard Spring extension point that developers can implement in custom classes (B), and it operates specifically during the initialization phase of the bean lifecycle - invoked both before (postProcessBeforeInitialization) and after (postProcessAfterInitialization) a bean's init method runs (D).

Why the distractors are wrong:

  • A is false - by the time BeanPostProcessor is called, dependency injection has already occurred; it hooks into initialization, not population.
  • C is false - BeanFactoryPostProcessor runs before BeanPostProcessor; factory-level processing happens first, then individual bean initialization.
  • E is false - BeanPostProcessor implementations can be ordered using the Ordered interface or @Order annotation, even in Spring Boot.

Memory tip: Think of the bean lifecycle in three stages - Instantiate → Populate (inject) → Initialize - and remember that BeanFactoryPostProcessor sounds "bigger" and runs earlier (factory level), while BeanPostProcessor is "smaller" and wraps each bean's init call. The word "Post" in both names refers to after bean definition loading, not after injection.

Topics

#BeanPostProcessor#Bean Lifecycle#Spring Container#Initialization

Community Discussion

No community discussion yet for this question.

Full 2V0-72.22PSE Practice