O'Reilly logo

Hands-On High Performance with Spring 5 by Dinesh Radadiya, Prashant Goswami, Pritesh Shah, Subhash Shah, Chintan Mehta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

ProxyFactoryBean

Spring provides a classic way of creating proxies of objects manually using ProxyFactoryBean, which will create an AOP proxy wrapping the target object. ProxyFactoryBean provides a way to set advice and advisors that are eventually merged into an AOP proxy. The key properties inherited from the org.springframework.aop.framework.ProxyConfig superclass for all AOP proxy factories in Spring are as follows:

  • proxyTargetClass: If it's true, then the proxy is created using CGLIB only. If it's not set, the proxy will be created using the JDK proxy if the target class implements the interface; otherwise, the proxy will be created using CGLIB.
  • optimizeFor the CGLIB proxy, this instructs the proxy to apply some aggressive optimizations. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required