2

I was doing some example to get better understanding how spring uses JDK proxy and CGLIB proxy. As I know that JDK Dynamic proxy can only proxy by interface and CGLIB can create a proxy by subclassing but when I have interface and I mark proxyTargetClass = true to use CGLIB proxy.It works well without any issues.I am not sure how it works internally , Could you help me to understand this.

See below code on interface it showing CGLIB proxy.

enter image description here

1 Answer 1

2

Implementing an interface is a kind of subclassing, which is why CGLIB can handle both interfaces and regular classes.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.