AOP problem running Spring unit tests

后端 未结 3 527
遇见更好的自我
遇见更好的自我 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:23

    I don't know if the solution was already shared and I am also sure the original requester must have found a solution, since it is a one year old query. For public interest however let me mention it here. Spring was using CGLIB because of the following declaration.

     
    
          
    
    

    The property should be set to false, so that the CGLIB is not triggered instead JDK Dynamic Proxying.

    
    

    Hope that helps.

提交回复
热议问题