intercepting inherited methods with spring aop


i have a UserDao interface that extends BaseDao and the implementation class is UserDaoHibernate defined as a spring bean.

I'm trying to intercept all kind of delete methods, some are declared in BaseDao, deleteById for example , and some are declared in UserDao, deleteByLogin for example.

using spring aop i can't figure out the pointcut to use:

        <aop:aspect id="deleteUserAspect" ref="deleteUserHandler">
            <aop:around method="handleDeleteUser"
                        pointcut="execution(* com.dao.UserDao.delete*(..))"/>

with this, spring aop will only intercept methods declared in UserDao but not in BaseDao.

I tried intercepting the class UserDaoHibernate with proxy-target-class="true" but its the same behavior because UserDaoHibernate extends BaseDaoHibernate and only methods declared in UserDaoHibernate are intercepted:

        <aop:aspect id="deleteUserAspect1" ref="deleteUserHandler">
            <aop:around method="handleDeleteUser"
                        pointcut="execution(* com.orm.hibernate.dao.UserDaoHibernate.delete*(..))"/>


any ideas on how to do that?


Thank you for your interest!

We will contact you as soon as possible.

Send us a message

Oops, something went wrong
Please try again or contact us by email at