I am using spring security and aspjectj with compile time weaving. I am trying to log successful user login. My pointcut looks as follows. but it is not getting
@Pointcut("execution(* com.myapp.dao.UserDao.loadUserByUsername(..))")
private void pointcutUserLoginLogging() {}
@AfterReturning(pointcut="pointcutUserLoginLogging()")
public void doUserLogging(JoinPoint joinPoint){
}
The method I am trying to inspect has the following signature
public class UserDao extends AbstractDao<User> implements GenericDao<User>, UserDetailsService {
@Transient
public UserDetails loadUserByUsername(String username)
throws UsernameNotFoundException, DataAccessException {
return loadByUsername(username);
}
}