Skip to content
Sharp

Spring Core · interview question

Why do teams use an interface-based proxy for transaction management over a CGLIB proxy in production code?

Multiple choiceHardchapter-9-curatedpremiumspring-coretransactions-and-proxies
Choose one answer
Answer and explanation

Correct answer

B. They are lighter and faster to create

Why

Interface-based proxies are generally lighter and faster to create because they use Java's native proxy mechanism, which does not require creating a subclass. This can lead to performance improvements in applications that extensively use proxies.

Test yourself on Spring Core

A free test with instant, explained results. No account needed.

Start free test
All Spring Core questions →