AOP problem running Spring unit tests

后端 未结 3 528
遇见更好的自我
遇见更好的自我 2021-02-08 15:20

I have a Spring web application which is configured to use JDK proxying for AOP. The AOP annotations (such as @Transactional) are declared on the interfaces, rather than the imp

3条回答
  •  离开以前
    2021-02-08 16:17

    Hey Jean, CGLib proxies are created by subclassing the class to be proxied -- you're attempting to proxy another proxy which isn't allowed since proxies are themselves final classes. Hence:

    Caused by: java.lang.IllegalArgumentException: Cannot subclass final class class $Proxy25

提交回复
热议问题