proxy-target-class= the difference between "true" and proxy-target-class= "false" _ Dynamic Proxy

Source: Internet
Author: User
<tx:annotation-driven transaction-manager= "TransactionManager"
Proxy-target-class= "true"/>
Note: The Proxy-target-class property value determines whether an interface based or a class-based proxy is created. If the value of the Proxy-target-class property is set to True, the class based proxy will work (this requires a cglib library). If the Proxy-target-class value is set to False or if this attribute is omitted, then the standard JDK agent based on the interface will work.


Even if you do not declare proxy-target-class= "true", but the run class does not inherit the interface, Spring automatically uses the Cglib proxy.

High version spring automatically selects JDK or Cglib agents based on the running class

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.