aspect parameter validation [closed]
- by user12558
Hi,
Im doing a POC using Aspectj.
class BaseInfo{..}
class UserInfo extends BaseInfo{..}
class UserService {
public void getUser(UserInfo userInfo){..}
public void deleteUser(String userId){..}
}
I've defined an advice, that gets invoked when I pass an UserInfo instance.But when i try to pass the BaseInfo, the advice is not getting invoked.
Below block executes the afterMethod as expected for getUser.
<aop:pointcut id="aopafterMethod" expression="execution(* UserService.*(..,UserInfo,..))" /
>aop:after pointcut-ref="aopafterMethod" method="afterMethod" /
But when i try to give BaseInfo instead of UserInfo, the aspect is not getting triggered.
Am i missing something?
Kindly help me on this issue.