Always thought spring ioc container objects are generated proxy object, in fact, this is wrong. spring ioc default are native objects only through aop enhanced object is a proxy object
There @Transactional annotation or configuration file
<aop:config> <aop:pointcut id="txPointcut" expression="execution(* com..service.impl.*.*(..))" /> <aop:advisor pointcut-ref="txPointcut" advice-ref="txAdvice" /> </aop:config>
There configure the interface aop enhanced class objects are obtained by a proxy object.
Set in cglib dynamic proxy for the class:
<aop:aspectj-autoproxy proxy-target-class="true"/>
Note: propagation mechanism things only a proxy object operation method only works