← Quiz: Spring AOP and Proxies: all 10 questions
Quiz: Spring AOP and Proxies · Question 5 of 10
A @Transactional annotation is placed on a private method. What happens?
A @Transactional annotation is placed on a private method. What happens?
- A.Compile error
- B.The transaction works normally
- C.Spring throws an exception at startup
- D.Nothing — the proxy cannot intercept private methods, so no transaction starts
Answer & explanation
Correct answer: Nothing — the proxy cannot intercept private methods, so no transaction starts
Proxies only see calls they can override or implement; private methods are invisible to them.
Can you get the rest right without peeking?
Take the timed Quiz: Spring AOP and Proxies quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →