Loading

Quipoin Menu

Learn • Practice • Grow

spring / Bean Post Processors
mcq
Direction: Choose the correct option

Q1.

What is a BeanPostProcessor?
A. A hook to customize beans before and after initialization
B. A processor that creates beans
C. A scope definition
D. A configuration tool
Direction: Choose the correct option

Q2.

How many methods does BeanPostProcessor interface have?
A. 1
B. 2
C. 3
D. 4
Direction: Choose the correct option

Q3.

What is the return value of postProcessBeforeInitialization?
A. The bean itself or a wrapped bean
B. void
C. boolean
D. Object
Direction: Choose the correct option

Q4.

When is postProcessBeforeInitialization called?
A. After bean properties are set but before initialization callbacks
B. Before setting properties
C. After initialization
D. After destroy
Direction: Choose the correct option

Q5.

What is a BeanFactoryPostProcessor?
A. A processor that operates on bean definitions before beans are created
B. Similar to BeanPostProcessor but after bean creation
C. A processor for factory beans
D. None
Direction: Choose the correct option

Q6.

Which interface is used to modify property placeholder values?
A. PropertyPlaceholderConfigurer
B. BeanFactoryPostProcessor
C. Both A and B
D. None
Direction: Choose the correct option

Q7.

What is the order of execution for multiple BeanPostProcessors?
A. Order can be set using Ordered interface or @Order
B. Random order
C. Alphabetical
D. By priority
Direction: Choose the correct option

Q8.

Can a BeanPostProcessor affect a bean after initialization?
A. Yes, via postProcessAfterInitialization
B. No, only before
C. Only on singleton beans
D. Only on prototype
Direction: Choose the correct option

Q9.

Which of the following is an example of BeanPostProcessor in Spring?
A. AutowiredAnnotationBeanPostProcessor
B. CommonAnnotationBeanPostProcessor
C. PersistenceExceptionTranslationPostProcessor
D. All of the above
Direction: Choose the correct option

Q10.

What is the difference between BeanPostProcessor and BeanFactoryPostProcessor?
A. BeanPostProcessor works on bean instances; BeanFactoryPostProcessor works on bean definitions
B. They are the same
C. BeanPostProcessor is newer
D. BeanFactoryPostProcessor works on instances