where does spring boot set proxy as CGLib

42 Views Asked by At

I use @Aspect in my spring boot project. I don't have to manually set @EnableAspectJAutoProxy because spring boot sets it automatically.

When I debug to to aspect class, it shows it as CGLib proxy

MyTestAspect$$EnhancerBySpringCGLib$$xxxxxxxx@1234

But @EnableAspectJAutoProxy has default proxyTargetClass = false, meaning JDK dynamic is default. Where does SpringBoot set it to true?

Updated:

spring.aop.proxy-target-class = true is used in both classes

TransactionAutoConfiguration.java

AopAutoConfiguration.java

0

There are 0 best solutions below