advancedSpring Internals — Bean Lifecycle & Proxies
How does @Configuration(proxyBeanMethods=false) improve startup performance, and what trade-offs does it introduce?
By default, @Configuration classes are CGLIB-proxied so that calling one @Bean method from another returns the SAME singleton instance. Setting proxyBeanMethods=false skips that proxy (faster startup, less CGLIB overhead) — but then calling one @Bean method directly from another creates a NEW instance instead of reusing the singleton, which only matters for configurations with inter-bean method calls.
This is a Pro question
Sign in, then upgrade to Pro or Power to unlock this question and the full Interview Prep bank.
How does @Configuration(proxyBeanMethods=false) improve startup performance, and what trade-offs does it introduce?